diff -Nru virtualbox-ose-5.0.0~beta1/Config.kmk virtualbox-ose-5.0.0~beta1/Config.kmk --- virtualbox-ose-5.0.0~beta1/Config.kmk 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/Config.kmk 2015-04-09 11:31:41.000000000 +0000 @@ -3905,7 +3905,7 @@ TEMPLATE_VBOXR3EXE_LDFLAGS.amd64 = -m64 TEMPLATE_VBOXR3EXE_LDFLAGS.sparc32 = -m32 TEMPLATE_VBOXR3EXE_LDFLAGS.sparc64 = -m64 -TEMPLATE_VBOXR3EXE_LDFLAGS.linux = -Wl,-z,noexecstack $(VBOX_LD_as_needed) +TEMPLATE_VBOXR3EXE_LDFLAGS.linux = -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) TEMPLATE_VBOXR3EXE_LDFLAGS.solaris = -Wl,-z,ignore # same as VBOX_LD_as_needed ifeq ($(KBUILD_TARGET),linux) @@ -4610,7 +4610,7 @@ TEMPLATE_VBOXMAINEXE_LDFLAGS.amd64 = -m64 ifeq ($(KBUILD_TARGET),linux) TEMPLATE_VBOXMAINEXE_LIBS = pthread m rt $(LIB_RUNTIME) dl -TEMPLATE_VBOXMAINEXE_LDFLAGS.linux = -Wl,-z,noexecstack $(VBOX_LD_as_needed) +TEMPLATE_VBOXMAINEXE_LDFLAGS.linux = -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) else ifeq ($(KBUILD_TARGET),os2) TEMPLATE_VBOXMAINEXE_TOOL = GXX3OMF TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME) @@ -5072,7 +5072,7 @@ $(VBOX_LIB_VMM_LAZY) ifeq ($(KBUILD_TARGET),linux) - TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += -Wl,-z,noexecstack $(VBOX_LD_as_needed) + TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) TEMPLATE_VBOXQT4GUIEXE_LIBS += \ $(VBOX_XCURSOR_LIBS) \ Xext \ diff -Nru virtualbox-ose-5.0.0~beta1/debian/bzr-builder.manifest virtualbox-ose-5.0.0~beta1/debian/bzr-builder.manifest --- virtualbox-ose-5.0.0~beta1/debian/bzr-builder.manifest 2015-04-08 11:33:07.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/debian/bzr-builder.manifest 2015-04-09 11:32:18.000000000 +0000 @@ -1,2 +1,2 @@ -# bzr-builder format 0.3 deb-version {debupstream}-0~54994 -lp:virtualbox revid:svn-v4:cfe28804-0f27-0410-a406-dd0f0b0b656f:trunk:55125 +# bzr-builder format 0.3 deb-version {debupstream}-0~55017 +lp:virtualbox revid:svn-v4:cfe28804-0f27-0410-a406-dd0f0b0b656f:trunk:55148 diff -Nru virtualbox-ose-5.0.0~beta1/debian/changelog virtualbox-ose-5.0.0~beta1/debian/changelog --- virtualbox-ose-5.0.0~beta1/debian/changelog 2015-04-08 11:33:07.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/debian/changelog 2015-04-09 11:32:18.000000000 +0000 @@ -1,8 +1,8 @@ -virtualbox-ose (5.0.0~beta1-0~54994~ubuntu14.10.1) utopic; urgency=low +virtualbox-ose (5.0.0~beta1-0~55017~ubuntu14.10.1) utopic; urgency=low * Auto build. - -- vovd Wed, 08 Apr 2015 11:33:07 +0000 + -- vovd Thu, 09 Apr 2015 11:32:18 +0000 virtualbox-ose (5.0.0~beta1) unstable; urgency=low diff -Nru virtualbox-ose-5.0.0~beta1/doc/manual/en_US/SDKRef.xml virtualbox-ose-5.0.0~beta1/doc/manual/en_US/SDKRef.xml --- virtualbox-ose-5.0.0~beta1/doc/manual/en_US/SDKRef.xml 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/doc/manual/en_US/SDKRef.xml 2015-04-09 11:31:41.000000000 +0000 @@ -3497,7 +3497,7 @@ Linux guests by dragging files, directories or text from the host into the guest's screen. This is called drag'n drop (DnD). - In version 4.4 support for Windows guests has been added, as well as + In version 5.0 support for Windows guests has been added, as well as the ability to transfer data the other way around, that is, from the guest to the host. @@ -3852,7 +3852,7 @@ existing client code. - Incompatible API changes with version 4.4 + Incompatible API changes with version 5.0 diff -Nru virtualbox-ose-5.0.0~beta1/doc/manual/en_US/user_AdvancedTopics.xml virtualbox-ose-5.0.0~beta1/doc/manual/en_US/user_AdvancedTopics.xml --- virtualbox-ose-5.0.0~beta1/doc/manual/en_US/user_AdvancedTopics.xml 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/doc/manual/en_US/user_AdvancedTopics.xml 2015-04-09 11:31:41.000000000 +0000 @@ -1790,18 +1790,18 @@ A VirtualBox VNIC template is a VNIC whose name starts with "vboxvnic_template" (case-sensitive). - On Solaris 11 hosts (i.e. when the default Crossbow based bridged - networking is used), using a VNIC template is the only means of specifying - a VLAN ID to use while bridging over a link. + On Solaris 11 hostsWhen Crossbow based bridged + networking is used., a VNIC template may be used to + specify the VLAN ID to use while bridging over a network link. - Here is an example of how to use a VNIC template to configure a VLAN - for VMs. Create a VirtualBox VNIC template, by executing as root: + Here is an example of how to use a VNIC template to configure a VM + over a VLAN. Create a VirtualBox VNIC template, by executing as root: dladm create-vnic -t -l nge0 -v 23 vboxvnic_template0 - This will create a temporary VNIC over interface "nge0" with the - VLAN ID 23. To create VNIC templates that are persistent across host - reboots, skip the -t parameter in the + This will create a temporary VNIC template over interface "nge0" + with the VLAN ID 23. To create VNIC templates that are persistent across + host reboots, skip the -t parameter in the above command. You may check the current state of links using: $ dladm show-link @@ -1814,20 +1814,19 @@ LINK OVER SPEED MACADDRESS MACADDRTYPE VID vboxvnic_template0 nge0 1000 2:8:20:25:12:75 random 23 - In the example above, once the VNIC template is created, any VMs - that need to be on VLAN 23 over the physical interface "nge0" can use - the VNIC template. - - VNIC templates makes managing VMs on VLANs simpler and efficient, as - the VLAN details are not stored as part of every VM's configuration but - rather inherited from the VNIC template which can be modified anytime - using dladm. - - Apart from the VLAN ID, VNIC templates can be created with - additional properties such as bandwidth limits, CPU fanout etc. Refer to - your Solaris network documentation on how to accomplish this. - These additional properties, if any, are also applied to VMs which use - the VNIC template. + Once the VNIC template is created, any VMs that need to be on VLAN + 23 over the interface "nge0" can be configured to bridge using this VNIC + template. + + VNIC templates makes managing VMs on VLANs simpler and efficient. + The VLAN details are not stored as part of every VM's configuration but + rather inherited from the VNIC template while starting the VM. The VNIC + template itself can be modified anytime using dladm. + + VNIC templates can be created with additional properties such as + bandwidth limits, CPU fanout etc. Refer to your Solaris network + documentation on how to accomplish this. These additional properties, + if any, are also applied to VMs which bridge using the VNIC template. diff -Nru virtualbox-ose-5.0.0~beta1/doc/manual/en_US/user_GuestAdditions.xml virtualbox-ose-5.0.0~beta1/doc/manual/en_US/user_GuestAdditions.xml --- virtualbox-ose-5.0.0~beta1/doc/manual/en_US/user_GuestAdditions.xml 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/doc/manual/en_US/user_GuestAdditions.xml 2015-04-09 11:31:41.000000000 +0000 @@ -1250,7 +1250,7 @@ Drag'n Drop - Starting with version 4.4, VirtualBox supports to drag'n drop content + Starting with version 5.0, VirtualBox supports to drag'n drop content from the host to the guest and vice versa. For this to work the latest Guest Additions must be installed on the guest. diff -Nru virtualbox-ose-5.0.0~beta1/doc/manual/en_US/user_Introduction.xml virtualbox-ose-5.0.0~beta1/doc/manual/en_US/user_Introduction.xml --- virtualbox-ose-5.0.0~beta1/doc/manual/en_US/user_Introduction.xml 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/doc/manual/en_US/user_Introduction.xml 2015-04-09 11:31:41.000000000 +0000 @@ -441,7 +441,7 @@ Preliminary Mac OS X support (beta stage) was added with VirtualBox 1.4, full support with 1.6. Mac OS X 10.4 (Tiger) support was removed with VirtualBox 3.1. Mac OS X 10.7 (Lion) - and earlier was removed with VirtualBox 4.4 + and earlier was removed with VirtualBox 5.0. diff -Nru virtualbox-ose-5.0.0~beta1/include/VBox/vmm/gim.h virtualbox-ose-5.0.0~beta1/include/VBox/vmm/gim.h --- virtualbox-ose-5.0.0~beta1/include/VBox/vmm/gim.h 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/include/VBox/vmm/gim.h 2015-04-09 11:31:41.000000000 +0000 @@ -174,7 +174,7 @@ VMM_INT_DECL(bool) GIMAreHypercallsEnabled(PVMCPU pVCpu); VMM_INT_DECL(int) GIMHypercall(PVMCPU pVCpu, PCPUMCTX pCtx); VMM_INT_DECL(int) GIMXcptUD(PVMCPU pVCpu, PCPUMCTX pCtx, PDISCPUSTATE pDis); -VMM_INT_DECL(bool) GIMShouldTrapXcptUD(PVM pVM); +VMM_INT_DECL(bool) GIMShouldTrapXcptUD(PVMCPU pVCpu); VMM_INT_DECL(VBOXSTRICTRC) GIMReadMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue); VMM_INT_DECL(VBOXSTRICTRC) GIMWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue); /** @} */ diff -Nru virtualbox-ose-5.0.0~beta1/include/VBox/vmm/hm.h virtualbox-ose-5.0.0~beta1/include/VBox/vmm/hm.h --- virtualbox-ose-5.0.0~beta1/include/VBox/vmm/hm.h 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/include/VBox/vmm/hm.h 2015-04-09 11:31:41.000000000 +0000 @@ -143,8 +143,8 @@ VMM_INT_DECL(PX86PDPE) HMGetPaePdpes(PVMCPU pVCpu); VMM_INT_DECL(int) HMAmdIsSubjectToErratum170(uint32_t *pu32Family, uint32_t *pu32Model, uint32_t *pu32Stepping); VMM_INT_DECL(bool) HMSetSingleInstruction(PVMCPU pVCpu, bool fEnable); -VMM_INT_DECL(void) HMHypercallsEnable(PVM pVM); -VMM_INT_DECL(void) HMHypercallsDisable(PVM pVM); +VMM_INT_DECL(void) HMHypercallsEnable(PVMCPU pVCpu); +VMM_INT_DECL(void) HMHypercallsDisable(PVMCPU pVCpu); #ifndef IN_RC VMM_INT_DECL(int) HMFlushTLB(PVMCPU pVCpu); diff -Nru virtualbox-ose-5.0.0~beta1/include/VBox/vmm/vmm.h virtualbox-ose-5.0.0~beta1/include/VBox/vmm/vmm.h --- virtualbox-ose-5.0.0~beta1/include/VBox/vmm/vmm.h 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/include/VBox/vmm/vmm.h 2015-04-09 11:31:41.000000000 +0000 @@ -268,8 +268,8 @@ VMM_INT_DECL(bool) VMMIsInRing3Call(PVMCPU pVCpu); VMM_INT_DECL(void) VMMTrashVolatileXMMRegs(void); VMM_INT_DECL(int) VMMPatchHypercall(PVM pVM, void *pvBuf, size_t cbBuf, size_t *pcbWritten); -VMM_INT_DECL(void) VMMHypercallsEnable(PVM pVM); -VMM_INT_DECL(void) VMMHypercallsDisable(PVM pVM); +VMM_INT_DECL(void) VMMHypercallsEnable(PVMCPU pVCpu); +VMM_INT_DECL(void) VMMHypercallsDisable(PVMCPU pVCpu); #if defined(IN_RING3) || defined(DOXYGEN_RUNNING) diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Devices/PC/BIOS/scsi.c virtualbox-ose-5.0.0~beta1/src/VBox/Devices/PC/BIOS/scsi.c --- virtualbox-ose-5.0.0~beta1/src/VBox/Devices/PC/BIOS/scsi.c 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Devices/PC/BIOS/scsi.c 2015-04-09 11:31:41.000000000 +0000 @@ -398,6 +398,8 @@ if (rc != 0) BX_PANIC("%s: SCSI_INQUIRY failed\n", __func__); + devcount_scsi = bios_dsk->scsi_devcount; + /* Check the attached device. */ if ( ((buffer[0] & 0xe0) == 0) && ((buffer[0] & 0x1f) == 0x00)) @@ -405,7 +407,7 @@ DBG_SCSI("%s: Disk detected at %d\n", __func__, i); /* We add the disk only if the maximum is not reached yet. */ - if (bios_dsk->scsi_devcount < BX_MAX_SCSI_DEVICES) + if (devcount_scsi < BX_MAX_SCSI_DEVICES) { uint32_t sectors, sector_size, cylinders; uint16_t heads, sectors_per_track; @@ -426,6 +428,7 @@ | ((uint32_t)buffer[1] << 16) | ((uint32_t)buffer[2] << 8) | ((uint32_t)buffer[3]); + ++sectors; /* Returned value is the last LBA, zero-based. */ sector_size = ((uint32_t)buffer[4] << 24) | ((uint32_t)buffer[5] << 16) @@ -440,8 +443,6 @@ continue; } - devcount_scsi = bios_dsk->scsi_devcount; - /* Get logical CHS geometry. */ switch (devcount_scsi) { @@ -536,7 +537,6 @@ write_byte(0x40, 0x75, hdcount); devcount_scsi++; - bios_dsk->scsi_devcount = devcount_scsi; } else { @@ -571,10 +571,11 @@ bios_dsk->cdcount = cdcount; devcount_scsi++; - bios_dsk->scsi_devcount = devcount_scsi; } else DBG_SCSI("%s: No supported device detected at %d\n", __func__, i); + + bios_dsk->scsi_devcount = devcount_scsi; } } diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -346,6 +346,7 @@ RTStrmPrintf(pStrm, " [--usb on|off]\n" " [--usbehci on|off]\n" + " [--usbxhci on|off]\n" " [--snapshotfolder default|]\n" " [--teleporter on|off]\n" " [--teleporterport ]\n" diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -207,6 +207,7 @@ static ULONG gcMonitors = 1; static ComObjPtr gpFramebuffer[64]; +static Bstr gaFramebufferId[64]; static SDL_Cursor *gpDefaultCursor = NULL; #ifdef VBOXSDL_WITH_X11 static Cursor gpDefaultOrigX11Cursor; @@ -2007,7 +2008,7 @@ for (ULONG i = 0; i < gcMonitors; i++) { // register our framebuffer - rc = gpDisplay->AttachFramebuffer(i, gpFramebuffer[i]); + rc = gpDisplay->AttachFramebuffer(i, gpFramebuffer[i], gaFramebufferId[i].asOutParam()); if (FAILED(rc)) { RTPrintf("Error: could not register framebuffer object!\n"); @@ -3027,7 +3028,7 @@ if (gpDisplay) { for (unsigned i = 0; i < gcMonitors; i++) - gpDisplay->DetachFramebuffer(i); + gpDisplay->DetachFramebuffer(i, gaFramebufferId[i].raw()); } gpMouse = NULL; diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -48,6 +48,7 @@ template<> bool canConvert() { return true; } template<> bool canConvert() { return true; } template<> bool canConvert() { return true; } +template<> bool canConvert() { return true; } template<> bool canConvert() { return true; } template<> bool canConvert() { return true; } template<> bool canConvert() { return true; } @@ -368,6 +369,19 @@ } return QString(); } + +/* QString <= KUSBControllerType: */ +template<> QString toString(const KUSBControllerType &type) +{ + switch (type) + { + case KUSBControllerType_OHCI: return QApplication::translate("VBoxGlobal", "OHCI", "USBControllerType"); + case KUSBControllerType_EHCI: return QApplication::translate("VBoxGlobal", "EHCI", "USBControllerType"); + case KUSBControllerType_XHCI: return QApplication::translate("VBoxGlobal", "xHCI", "USBControllerType"); + AssertMsgFailed(("No text for %d", type)); break; + } + return QString(); +} /* QString <= KUSBDeviceState: */ template<> QString toString(const KUSBDeviceState &state) diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h --- virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h 2015-04-09 11:31:41.000000000 +0000 @@ -114,6 +114,7 @@ template<> bool canConvert(); template<> bool canConvert(); template<> bool canConvert(); +template<> bool canConvert(); template<> bool canConvert(); template<> bool canConvert(); template<> bool canConvert(); @@ -203,6 +204,7 @@ template<> QString toString(const KNetworkAdapterType &type); template<> QString toString(const KNetworkAdapterPromiscModePolicy &policy); template<> QString toString(const KPortMode &mode); +template<> QString toString(const KUSBControllerType &type); template<> QString toString(const KUSBDeviceState &state); template<> QString toString(const KUSBDeviceFilterAction &action); template<> QString toString(const KAudioDriverType &type); diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/extensions/QIStyledItemDelegate.h virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/extensions/QIStyledItemDelegate.h --- virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/extensions/QIStyledItemDelegate.h 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/extensions/QIStyledItemDelegate.h 2015-04-09 11:31:41.000000000 +0000 @@ -27,23 +27,41 @@ { Q_OBJECT; +signals: + + /** Notifies listeners about + * created editor's Enter/Return key triggering. */ + void sigEditorEnterKeyTriggered(); + public: /** Constructor. */ - QIStyledItemDelegate(QObject *pParent) : QStyledItemDelegate(pParent) {} + QIStyledItemDelegate(QObject *pParent) + : QStyledItemDelegate(pParent) + , m_fWatchForEditorEnterKeyTriggering(false) + {} + + /** Defines whether QIStyledItemDelegate should watch for the created editor's Enter/Return key triggering. */ + void setWatchForEditorEnterKeyTriggering(bool fWatch) { m_fWatchForEditorEnterKeyTriggering = fWatch; } private: /** Returns the widget used to edit the item specified by @a index for editing. * The @a pParent widget and style @a option are used to control how the editor widget appears. - * Besides Qt description copy-pasted above we are installing the hook to redirect editor's sigCommitData signal. */ + * Besides that, we are installing the hooks to redirect editor's sigCommitData and sigEnterKeyTriggered signals. */ QWidget* createEditor(QWidget *pParent, const QStyleOptionViewItem &option, const QModelIndex &index) const { /* Call to base-class to get actual editor created: */ QWidget *pEditor = QStyledItemDelegate::createEditor(pParent, option, index); - /* All the stuff we actually need from QIStyledItemDelegate is to redirect this one signal: */ + /* All the stuff we actually need from QIStyledItemDelegate is to redirect these signals: */ connect(pEditor, SIGNAL(sigCommitData(QWidget*)), this, SIGNAL(commitData(QWidget*))); + if (m_fWatchForEditorEnterKeyTriggering) + connect(pEditor, SIGNAL(sigEnterKeyTriggered()), this, SIGNAL(sigEditorEnterKeyTriggered())); /* Return actual editor: */ return pEditor; } + + /** Holds whether QIStyledItemDelegate should watch + * for the created editor's Enter/Return key triggering. */ + bool m_fWatchForEditorEnterKeyTriggering; }; diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.cpp virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -67,6 +67,9 @@ /** Notifies listeners about data should be committed. */ void sigCommitData(QWidget *pThis); + /** Notifies listeners about Enter/Return key triggering. */ + void sigEnterKeyTriggered(); + public: /** Constructor. @@ -83,6 +86,9 @@ /** Prepare routine. */ void prepare(); + /** Key press @a pEvent handler. */ + void keyPressEvent(QKeyEvent *pEvent); + /** Property: Returns the current password of the editor. */ QString password() const { return QLineEdit::text(); } /** Property: Defines the current @a strPassword of the editor. */ @@ -153,6 +159,9 @@ /** Notifies listeners about data change. */ void sigDataChanged(); + /** Notifies listeners about editor's Enter/Return key triggering. */ + void sigEditorEnterKeyTriggered(); + public: /** Constructor. @@ -204,6 +213,23 @@ this, SLOT(sltPasswordChanged(const QString&))); } +void UIPasswordEditor::keyPressEvent(QKeyEvent *pEvent) +{ + /* Call to base-class: */ + QLineEdit::keyPressEvent(pEvent); + + /* Broadcast Enter/Return key press: */ + switch (pEvent->key()) + { + case Qt::Key_Enter: + case Qt::Key_Return: + emit sigEnterKeyTriggered(); + break; + default: + break; + } +} + UIEncryptionDataModel::UIEncryptionDataModel(QObject *pParent, const EncryptedMediumMap &encryptedMediums) : QAbstractTableModel(pParent) , m_encryptedMediums(encryptedMediums) @@ -466,6 +492,10 @@ /* Assign configured item delegate to table: */ delete itemDelegate(); setItemDelegate(pStyledItemDelegate); + /* Configure item delegate: */ + pStyledItemDelegate->setWatchForEditorEnterKeyTriggering(true); + connect(pStyledItemDelegate, SIGNAL(sigEditorEnterKeyTriggered()), + this, SIGNAL(sigEditorEnterKeyTriggered())); } /* Configure table: */ @@ -508,6 +538,12 @@ return m_pTableEncryptionData->encryptionPasswords(); } +void UIAddDiskEncryptionPasswordDialog::sltEditorEnterKeyTriggered() +{ + if (m_pButtonBox->button(QDialogButtonBox::Ok)->isEnabled()) + accept(); +} + void UIAddDiskEncryptionPasswordDialog::prepare() { /* Configure self: */ @@ -535,6 +571,8 @@ /* Configure encryption-data table: */ connect(m_pTableEncryptionData, SIGNAL(sigDataChanged()), this, SLOT(sltDataChanged())); + connect(m_pTableEncryptionData, SIGNAL(sigEditorEnterKeyTriggered()), + this, SLOT(sltEditorEnterKeyTriggered())); m_pTableEncryptionData->setFocus(); m_pTableEncryptionData->editFirstIndex(); /* Add label into layout: */ diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.h virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.h --- virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.h 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.h 2015-04-09 11:31:41.000000000 +0000 @@ -58,6 +58,9 @@ /** Handles the data change. */ void sltDataChanged() { revalidate(); } + /** Handles editor's Enter/Return key triggering. */ + void sltEditorEnterKeyTriggered(); + private: /** Prepare routine. */ diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -380,6 +380,8 @@ #ifdef Q_OS_WIN CComPtr m_pUnkMarshaler; #endif /* Q_OS_WIN */ + /** Identifier returned by AttachFramebuffer. Used in DetachFramebuffer. */ + QString m_strFramebufferId; }; @@ -517,7 +519,7 @@ , m_fPendingSourceBitmap(false) , m_pMachineView(NULL) , m_iWinId(0) - , m_fUpdatesAllowed(true) + , m_fUpdatesAllowed(false) , m_fUnused(false) , m_fAutoEnabled(false) , m_dScaleFactor(1.0) @@ -598,14 +600,17 @@ void UIFrameBufferPrivate::attach() { - display().AttachFramebuffer(m_uScreenId, CFramebuffer(this)); + m_strFramebufferId = display().AttachFramebuffer(m_uScreenId, CFramebuffer(this)); } void UIFrameBufferPrivate::detach() { CFramebuffer frameBuffer = display().QueryFramebuffer(m_uScreenId); if (!frameBuffer.isNull()) - display().DetachFramebuffer(m_uScreenId); + { + display().DetachFramebuffer(m_uScreenId, m_strFramebufferId); + m_strFramebufferId.clear(); + } } void UIFrameBufferPrivate::setMarkAsUnused(bool fUnused) @@ -825,9 +830,10 @@ /* Ignore NotifyUpdate: */ return E_FAIL; } - - /* Directly update m_image: */ - if (m_fUpdatesAllowed) + /* Directly update m_image if update fits: */ + if ( m_fUpdatesAllowed + && uX + uWidth <= (ULONG)m_image.width() + && uY + uHeight <= (ULONG)m_image.height()) { /* Copy to m_image: */ uchar *pu8Dst = m_image.bits() + uY * m_image.bytesPerLine() + uX * 4; diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -90,6 +90,7 @@ /* Other VBox includes: */ # include +# include # ifdef VBOX_WITH_DEBUGGER_GUI # include # include @@ -558,6 +559,25 @@ { /* VM has been powered off, saved, teleported or aborted. * We must close Runtime UI: */ + if (vboxGlobal().isSeparateProcess()) + { + /* Hack: The VM process is terminating, so wait a bit to make sure that + * the session is unlocked and the GUI process can save extradata + * in UIMachine::cleanupMachineLogic. + */ + /** @todo Probably should wait for the session state change event. */ + KSessionState sessionState = uisession()->session().GetState(); + int c = 0; + while ( sessionState == KSessionState_Locked + || sessionState == KSessionState_Unlocking) + { + if (++c > 50) break; + + RTThreadSleep(100); + sessionState = uisession()->session().GetState(); + } + } + uisession()->closeRuntimeUI(); return; } diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -240,6 +240,7 @@ { /* Get new state-pixmap and state-pixmap size: */ const QIcon stateIcon = machineStateIcon(); + AssertReturnVoid(!stateIcon.isNull()); const QSize statePixmapSize = stateIcon.availableSizes().first(); const QPixmap statePixmap = stateIcon.pixmap(statePixmapSize); /* Update linked values: */ diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -936,9 +936,17 @@ const CUSBDeviceFilters &filters = machine().GetUSBDeviceFilters(); if (!filters.isNull() && machine().GetUSBProxyAvailable()) { - const CUSBDeviceFilters &flts = machine().GetUSBDeviceFilters(); - if (!flts.isNull() && !machine().GetUSBControllers().isEmpty()) + const CUSBDeviceFilters flts = machine().GetUSBDeviceFilters(); + const CUSBControllerVector controllers = machine().GetUSBControllers(); + if (!flts.isNull() && !controllers.isEmpty()) { + /* USB Controllers info: */ + QStringList controllerList; + foreach (const CUSBController &controller, controllers) + controllerList << gpConverter->toString(controller.GetType()); + m_text << UITextTableLine(QApplication::translate("UIGDetails", "USB Controller", "details (usb)"), + controllerList.join(", ")); + /* USB Device Filters info: */ const CUSBDeviceFilterVector &coll = flts.GetDeviceFilters(); uint uActive = 0; for (int i = 0; i < coll.size(); ++i) diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Installer/common/virtualbox.desktop.in virtualbox-ose-5.0.0~beta1/src/VBox/Installer/common/virtualbox.desktop.in --- virtualbox-ose-5.0.0~beta1/src/VBox/Installer/common/virtualbox.desktop.in 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Installer/common/virtualbox.desktop.in 2015-04-09 11:31:41.000000000 +0000 @@ -3,9 +3,12 @@ Version=1.0 Name=@VBOX_PRODUCT@ GenericName=Virtual Machine +GenericName[de]=Virtuelle Maschine Type=Application Exec=VirtualBox %U TryExec=VirtualBox +Keywords=virtualization +Keywords[de]=Virtualisierung MimeType=application/x-virtualbox-vbox;application/x-virtualbox-vbox-extpack;application/x-virtualbox-ovf;application/x-virtualbox-ova; DocPath=file://@VBOX_DOC_PATH@/UserManual.pdf Icon=virtualbox diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Installer/linux/distributions_deb virtualbox-ose-5.0.0~beta1/src/VBox/Installer/linux/distributions_deb --- virtualbox-ose-5.0.0~beta1/src/VBox/Installer/linux/distributions_deb 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Installer/linux/distributions_deb 2015-04-09 11:31:41.000000000 +0000 @@ -1,4 +1,5 @@ -_Debian_sid = DEBIAN_7_0 +_Debian_sid = DEBIAN_8_0 +_Debian_jessie = DEBIAN_8_0 _Debian_wheezy = DEBIAN_7_0 _Debian_squeeze = DEBIAN_6_0 _Ubuntu_raring = UBUNTU_13_04 diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Main/idl/VirtualBox.xidl virtualbox-ose-5.0.0~beta1/src/VBox/Main/idl/VirtualBox.xidl --- virtualbox-ose-5.0.0~beta1/src/VBox/Main/idl/VirtualBox.xidl 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Main/idl/VirtualBox.xidl 2015-04-09 11:31:41.000000000 +0000 @@ -15937,7 +15937,7 @@ @@ -15977,6 +15977,7 @@ + @@ -15984,6 +15985,7 @@ Removes the graphics updates target for a screen. + diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Main/include/DisplayImpl.h virtualbox-ose-5.0.0~beta1/src/VBox/Main/include/DisplayImpl.h --- virtualbox-ose-5.0.0~beta1/src/VBox/Main/include/DisplayImpl.h 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Main/include/DisplayImpl.h 2015-04-09 11:31:41.000000000 +0000 @@ -47,6 +47,7 @@ uint32_t u32InformationSize; ComPtr pFramebuffer; + com::Guid framebufferId; ComPtr pSourceBitmap; bool fDisabled; @@ -224,8 +225,10 @@ LONG *aYOrigin, GuestMonitorStatus_T *aGuestMonitorStatus); virtual HRESULT attachFramebuffer(ULONG aScreenId, - const ComPtr &aFramebuffer); - virtual HRESULT detachFramebuffer(ULONG aScreenId); + const ComPtr &aFramebuffer, + com::Guid &aId); + virtual HRESULT detachFramebuffer(ULONG aScreenId, + const com::Guid &aId); virtual HRESULT queryFramebuffer(ULONG aScreenId, ComPtr &aFramebuffer); virtual HRESULT setVideoModeHint(ULONG aDisplay, diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Main/src-client/DisplayImpl.cpp virtualbox-ose-5.0.0~beta1/src/VBox/Main/src-client/DisplayImpl.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/Main/src-client/DisplayImpl.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Main/src-client/DisplayImpl.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -1601,7 +1601,7 @@ } -HRESULT Display::attachFramebuffer(ULONG aScreenId, const ComPtr &aFramebuffer) +HRESULT Display::attachFramebuffer(ULONG aScreenId, const ComPtr &aFramebuffer, com::Guid &aId) { LogRelFlowFunc(("aScreenId = %d\n", aScreenId)); @@ -1617,6 +1617,8 @@ aScreenId); pFBInfo->pFramebuffer = aFramebuffer; + pFBInfo->framebufferId.create(); + aId = pFBInfo->framebufferId; SafeArray caps; pFBInfo->pFramebuffer->COMGETTER(Capabilities)(ComSafeArrayAsOutParam(caps)); @@ -1662,13 +1664,13 @@ 3, this, aScreenId, false); } - LogRelFlowFunc(("Attached to %d\n", aScreenId)); + LogRelFlowFunc(("Attached to %d %RTuuid\n", aScreenId, aId.raw())); return S_OK; } -HRESULT Display::detachFramebuffer(ULONG aScreenId) +HRESULT Display::detachFramebuffer(ULONG aScreenId, const com::Guid &aId) { - LogRelFlowFunc(("aScreenId = %d\n", aScreenId)); + LogRelFlowFunc(("aScreenId = %d %RTuuid\n", aScreenId, aId.raw())); AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); @@ -1678,7 +1680,14 @@ DISPLAYFBINFO *pFBInfo = &maFramebuffers[aScreenId]; + if (pFBInfo->framebufferId != aId) + { + LogRelFlowFunc(("Invalid framebuffer aScreenId = %d, attached %p\n", aScreenId, pFBInfo->framebufferId.raw())); + return setError(E_FAIL, tr("DetachFramebuffer: Invalid framebuffer object")); + } + pFBInfo->pFramebuffer.setNull(); + pFBInfo->framebufferId.clear(); alock.release(); diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/Runtime/r3/win/process-win.cpp virtualbox-ose-5.0.0~beta1/src/VBox/Runtime/r3/win/process-win.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/Runtime/r3/win/process-win.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/Runtime/r3/win/process-win.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -845,13 +845,13 @@ dwErr = NO_ERROR; PSID pSid = (PSID)RTMemAlloc(cbSid * sizeof(wchar_t)); /** @todo r=bird: What's the relationship between wchar_t and PSID? */ - AssertPtrReturn(pSid, VERR_NO_MEMORY); /** @todo r=bird: Leaking token handles when we're out of memory... */ + AssertReturn(pSid, VERR_NO_MEMORY); /** @todo r=bird: Leaking token handles when we're out of memory... */ PRTUTF16 pwszDomain = NULL; if (cchDomain > 0) { pwszDomain = (PRTUTF16)RTMemAlloc(cchDomain * sizeof(RTUTF16)); - AssertPtrReturn(pwszDomain, VERR_NO_MEMORY); /** @todo r=bird: Leaking token handles when we're out of memory... */ + AssertReturn(pwszDomain, VERR_NO_MEMORY); /** @todo r=bird: Leaking token handles when we're out of memory... */ } /* Note: Also supports FQDNs! */ diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/VMM/include/GIMKvmInternal.h virtualbox-ose-5.0.0~beta1/src/VBox/VMM/include/GIMKvmInternal.h --- virtualbox-ose-5.0.0~beta1/src/VBox/VMM/include/GIMKvmInternal.h 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/VMM/include/GIMKvmInternal.h 2015-04-09 11:31:41.000000000 +0000 @@ -260,7 +260,7 @@ VMM_INT_DECL(int) gimKvmHypercall(PVMCPU pVCpu, PCPUMCTX pCtx); VMM_INT_DECL(VBOXSTRICTRC) gimKvmReadMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue); VMM_INT_DECL(VBOXSTRICTRC) gimKvmWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uRawValue); -VMM_INT_DECL(bool) gimKvmShouldTrapXcptUD(PVM pVM); +VMM_INT_DECL(bool) gimKvmShouldTrapXcptUD(PVMCPU pVCpu); VMM_INT_DECL(int) gimKvmXcptUD(PVMCPU pVCpu, PCPUMCTX pCtx, PDISCPUSTATE pDis); diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/VMM/include/HMInternal.h virtualbox-ose-5.0.0~beta1/src/VBox/VMM/include/HMInternal.h --- virtualbox-ose-5.0.0~beta1/src/VBox/VMM/include/HMInternal.h 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/VMM/include/HMInternal.h 2015-04-09 11:31:41.000000000 +0000 @@ -163,18 +163,19 @@ #define HM_CHANGED_GUEST_SYSENTER_ESP_MSR RT_BIT(15) #define HM_CHANGED_GUEST_EFER_MSR RT_BIT(16) #define HM_CHANGED_GUEST_LAZY_MSRS RT_BIT(17) /* Shared */ +#define HM_CHANGED_GUEST_XCPT_INTERCEPTS RT_BIT(18) /* VT-x specific state. */ -#define HM_CHANGED_VMX_GUEST_AUTO_MSRS RT_BIT(18) -#define HM_CHANGED_VMX_GUEST_ACTIVITY_STATE RT_BIT(19) -#define HM_CHANGED_VMX_GUEST_APIC_STATE RT_BIT(20) -#define HM_CHANGED_VMX_ENTRY_CTLS RT_BIT(21) -#define HM_CHANGED_VMX_EXIT_CTLS RT_BIT(22) +#define HM_CHANGED_VMX_GUEST_AUTO_MSRS RT_BIT(19) +#define HM_CHANGED_VMX_GUEST_ACTIVITY_STATE RT_BIT(20) +#define HM_CHANGED_VMX_GUEST_APIC_STATE RT_BIT(21) +#define HM_CHANGED_VMX_ENTRY_CTLS RT_BIT(22) +#define HM_CHANGED_VMX_EXIT_CTLS RT_BIT(23) /* AMD-V specific state. */ -#define HM_CHANGED_SVM_GUEST_APIC_STATE RT_BIT(18) -#define HM_CHANGED_SVM_RESERVED1 RT_BIT(19) -#define HM_CHANGED_SVM_RESERVED2 RT_BIT(20) -#define HM_CHANGED_SVM_RESERVED3 RT_BIT(21) -#define HM_CHANGED_SVM_RESERVED4 RT_BIT(22) +#define HM_CHANGED_SVM_GUEST_APIC_STATE RT_BIT(19) +#define HM_CHANGED_SVM_RESERVED1 RT_BIT(20) +#define HM_CHANGED_SVM_RESERVED2 RT_BIT(21) +#define HM_CHANGED_SVM_RESERVED3 RT_BIT(22) +#define HM_CHANGED_SVM_RESERVED4 RT_BIT(23) #define HM_CHANGED_ALL_GUEST ( HM_CHANGED_GUEST_CR0 \ | HM_CHANGED_GUEST_CR3 \ @@ -194,13 +195,14 @@ | HM_CHANGED_GUEST_SYSENTER_ESP_MSR \ | HM_CHANGED_GUEST_EFER_MSR \ | HM_CHANGED_GUEST_LAZY_MSRS \ + | HM_CHANGED_GUEST_XCPT_INTERCEPTS \ | HM_CHANGED_VMX_GUEST_AUTO_MSRS \ | HM_CHANGED_VMX_GUEST_ACTIVITY_STATE \ | HM_CHANGED_VMX_GUEST_APIC_STATE \ | HM_CHANGED_VMX_ENTRY_CTLS \ | HM_CHANGED_VMX_EXIT_CTLS) -#define HM_CHANGED_HOST_CONTEXT RT_BIT(23) +#define HM_CHANGED_HOST_CONTEXT RT_BIT(24) /* Bits shared between host and guest. */ #define HM_CHANGED_HOST_GUEST_SHARED_STATE ( HM_CHANGED_GUEST_CR0 \ @@ -342,11 +344,7 @@ bool fGlobalInit; /** Set when TPR patching is active. */ bool fTPRPatchingActive; - /** Whether #UD needs to be intercepted (required by certain GIM providers). */ - bool fGIMTrapXcptUD; - /** Whether paravirt. hypercalls are enabled. */ - bool fHypercallsEnabled; - bool u8Alignment[1]; + bool u8Alignment[3]; /** Host kernel flags that HM might need to know (SUPKERNELFEATURES_XXX). */ uint32_t uHostKernelFeatures; @@ -584,6 +582,12 @@ /** Whether to preload the guest-FPU state to avoid #NM VM-exit overhead. */ bool fPreloadGuestFpu; + /** Whether #UD needs to be intercepted (required by certain GIM providers). */ + bool fGIMTrapXcptUD; + /** Whether paravirt. hypercalls are enabled. */ + bool fHypercallsEnabled; + uint8_t u8Alignment0[6]; + /** World switch exit counter. */ volatile uint32_t cWorldSwitchExits; /** HM_CHANGED_* flags. */ diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/GIMAll.cpp virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/GIMAll.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/GIMAll.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/GIMAll.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -148,17 +148,18 @@ * really required. * * @returns true if needed, false otherwise. - * @param pVM Pointer to the VM. + * @param pVCpu Pointer to the VMCPU. */ -VMM_INT_DECL(bool) GIMShouldTrapXcptUD(PVM pVM) +VMM_INT_DECL(bool) GIMShouldTrapXcptUD(PVMCPU pVCpu) { + PVM pVM = pVCpu->CTX_SUFF(pVM); if (!GIMIsEnabled(pVM)) return false; switch (pVM->gim.s.enmProviderId) { case GIMPROVIDERID_KVM: - return gimKvmShouldTrapXcptUD(pVM); + return gimKvmShouldTrapXcptUD(pVCpu); default: return false; diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/GIMAllKvm.cpp virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/GIMAllKvm.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/GIMAllKvm.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/GIMAllKvm.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -323,10 +323,11 @@ * * For raw-mode VMs, this function will always return true. See gimR3KvmInit(). * - * @param pVM Pointer to the VM. + * @param pVCpu Pointer to the VMCPU. */ -VMM_INT_DECL(bool) gimKvmShouldTrapXcptUD(PVM pVM) +VMM_INT_DECL(bool) gimKvmShouldTrapXcptUD(PVMCPU pVCpu) { + PVM pVM = pVCpu->CTX_SUFF(pVM); return pVM->gim.s.u.Kvm.fTrapXcptUD; } diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/HMAll.cpp virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/HMAll.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/HMAll.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/HMAll.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -509,21 +509,45 @@ /** * Notifies HM that paravirtualized hypercalls are now enabled. * - * @param pVM Pointer to the VM. + * @param pVCpu Pointer to the VMCPU. */ -VMM_INT_DECL(void) HMHypercallsEnable(PVM pVM) +VMM_INT_DECL(void) HMHypercallsEnable(PVMCPU pVCpu) { - pVM->hm.s.fHypercallsEnabled = true; + pVCpu->hm.s.fHypercallsEnabled = true; } /** * Notifies HM that paravirtualized hypercalls are now disabled. * - * @param pVM Pointer to the VM. + * @param pVCpu Pointer to the VMCPU. */ -VMM_INT_DECL(void) HMHypercallsDisable(PVM pVM) +VMM_INT_DECL(void) HMHypercallsDisable(PVMCPU pVCpu) { - pVM->hm.s.fHypercallsEnabled = false; + pVCpu->hm.s.fHypercallsEnabled = false; +} + + +/** + * Notifies HM that GIM provider wants to trap #UD. + * + * @param pVCpu Pointer to the VMCPU. + */ +VMM_INT_DECL(void) HMTrapXcptUDForGIMEnable(PVMCPU pVCpu) +{ + pVCpu->hm.s.fGIMTrapXcptUD = true; + HMCPU_CF_SET(pVCpu, HM_CHANGED_GUEST_XCPT_INTERCEPTS); +} + + +/** + * Notifies HM that GIM provider no longer wants to trap #UD. + * + * @param pVCpu Pointer to the VMCPU. + */ +VMM_INT_DECL(void) HMTrapXcptUDForGIMDisable(PVMCPU pVCpu) +{ + pVCpu->hm.s.fGIMTrapXcptUD = false; + HMCPU_CF_SET(pVCpu, HM_CHANGED_GUEST_XCPT_INTERCEPTS); } diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/VMMAll.cpp virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/VMMAll.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/VMMAll.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMAll/VMMAll.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -438,14 +438,14 @@ /** * Notifies VMM that paravirtualized hypercalls are now enabled. * - * @param pVM Pointer to the VM. + * @param pVCpu Pointer to the VMCPU. */ -VMM_INT_DECL(void) VMMHypercallsEnable(PVM pVM) +VMM_INT_DECL(void) VMMHypercallsEnable(PVMCPU pVCpu) { /* If there is anything to do for raw-mode, do it here. */ #ifndef IN_RC - if (HMIsEnabled(pVM)) - HMHypercallsEnable(pVM); + if (HMIsEnabled(pVCpu->CTX_SUFF(pVM))) + HMHypercallsEnable(pVCpu); #endif } @@ -453,14 +453,14 @@ /** * Notifies VMM that paravirtualized hypercalls are now disabled. * - * @param pVM Pointer to the VM. + * @param pVCpu Pointer to the VMCPU. */ -VMM_INT_DECL(void) VMMHypercallsDisable(PVM pVM) +VMM_INT_DECL(void) VMMHypercallsDisable(PVMCPU pVCpu) { /* If there is anything to do for raw-mode, do it here. */ #ifndef IN_RC - if (HMIsEnabled(pVM)) - HMHypercallsDisable(pVM); + if (HMIsEnabled(pVCpu->CTX_SUFF(pVM))) + HMHypercallsDisable(pVCpu); #endif } diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR0/HMR0.cpp virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR0/HMR0.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR0/HMR0.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR0/HMR0.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -1213,8 +1213,6 @@ pVM->hm.s.lLastError = g_HvmR0.lLastError; pVM->hm.s.uMaxAsid = g_HvmR0.uMaxAsid; - pVM->hm.s.fGIMTrapXcptUD = GIMShouldTrapXcptUD(pVM); - if (!pVM->hm.s.cMaxResumeLoops) /* allow ring-3 overrides */ { pVM->hm.s.cMaxResumeLoops = 1024; @@ -1228,8 +1226,9 @@ for (VMCPUID i = 0; i < pVM->cCpus; i++) { PVMCPU pVCpu = &pVM->aCpus[i]; - pVCpu->hm.s.idEnteredCpu = NIL_RTCPUID; - pVCpu->hm.s.idLastCpu = NIL_RTCPUID; + pVCpu->hm.s.idEnteredCpu = NIL_RTCPUID; + pVCpu->hm.s.idLastCpu = NIL_RTCPUID; + pVCpu->hm.s.fGIMTrapXcptUD = GIMShouldTrapXcptUD(pVCpu); /* We'll aways increment this the first time (host uses ASID 0). */ AssertReturn(!pVCpu->hm.s.uCurrentAsid, VERR_HM_IPE_3); diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR0/HMSVMR0.cpp virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR0/HMSVMR0.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR0/HMSVMR0.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR0/HMSVMR0.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -669,7 +669,6 @@ AssertReturn(pVM, VERR_INVALID_PARAMETER); Assert(pVM->hm.s.svm.fSupported); - uint32_t const fGimXcptIntercepts = pVM->hm.s.fGIMTrapXcptUD ? RT_BIT(X86_XCPT_UD) : 0; for (VMCPUID i = 0; i < pVM->cCpus; i++) { PVMCPU pVCpu = &pVM->aCpus[i]; @@ -786,7 +785,8 @@ #endif /* Apply the exceptions intercepts needed by the GIM provider. */ - pVmcb->ctrl.u32InterceptException |= fGimXcptIntercepts; + if (pVCpu->hm.s.fGIMTrapXcptUD) + pVmcb->ctrl.u32InterceptException |= RT_BIT(X86_XCPT_UD); /* * The following MSRs are saved/restored automatically during the world-switch. @@ -1633,6 +1633,30 @@ /** + * Loads the exception interrupts required for guest execution in the VMCB. + * + * @returns VBox status code. + * @param pVCpu Pointer to the VMCPU. + * @param pVmcb Pointer to the VM control block. + * @param pCtx Pointer to the guest-CPU context. + */ +static int hmR0SvmLoadGuestXcptIntercepts(PVMCPU pVCpu, PSVMVMCB pVmcb, PCPUMCTX pCtx) +{ + int rc = VINF_SUCCESS; + if (HMCPU_CF_IS_PENDING(pVCpu, HM_CHANGED_GUEST_XCPT_INTERCEPTS)) + { + /* The remaining intercepts are handled elsewhere, e.g. in hmR0SvmLoadSharedCR0(). */ + if (pVCpu->hm.s.fGIMTrapXcptUD) + hmR0SvmAddXcptIntercept(pVmcb, X86_XCPT_UD); + else + hmR0SvmRemoveXcptIntercept(pVmcb, X86_XCPT_UD); + HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_XCPT_INTERCEPTS); + } + return rc; +} + + +/** * Sets up the appropriate function to run guest code. * * @returns VBox status code. @@ -1816,6 +1840,9 @@ rc = hmR0SvmLoadGuestApicState(pVCpu, pVmcb, pCtx); AssertLogRelMsgRCReturn(rc, ("hmR0SvmLoadGuestApicState! rc=%Rrc (pVM=%p pVCpu=%p)\n", rc, pVM, pVCpu), rc); + rc = hmR0SvmLoadGuestXcptIntercepts(pVCpu, pVmcb, pCtx); + AssertLogRelMsgRCReturn(rc, ("hmR0SvmLoadGuestXcptIntercepts! rc=%Rrc (pVM=%p pVCpu=%p)\n", rc, pVM, pVCpu), rc); + rc = hmR0SvmSetupVMRunHandler(pVCpu, pCtx); AssertLogRelMsgRCReturn(rc, ("hmR0SvmSetupVMRunHandler! rc=%Rrc (pVM=%p pVCpu=%p)\n", rc, pVM, pVCpu), rc); @@ -5007,8 +5034,7 @@ } else if (rc == VERR_NOT_FOUND) { - PVM pVM = pVCpu->CTX_SUFF(pVM); - if (pVM->hm.s.fHypercallsEnabled) + if (pVCpu->hm.s.fHypercallsEnabled) { rc = GIMHypercall(pVCpu, pCtx); if (RT_SUCCESS(rc)) @@ -5226,8 +5252,7 @@ HMSVM_CHECK_EXIT_DUE_TO_EVENT_DELIVERY(); - PVM pVM = pVCpu->CTX_SUFF(pVM); - if (pVM->hm.s.fGIMTrapXcptUD) + if (pVCpu->hm.s.fGIMTrapXcptUD) GIMXcptUD(pVCpu, pCtx, NULL /* pDis */); else hmR0SvmSetPendingXcptUD(pVCpu); diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR0/HMVMXR0.cpp virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR0/HMVMXR0.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR0/HMVMXR0.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR0/HMVMXR0.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -2634,7 +2634,7 @@ LogFlowFunc(("pVM=%p pVCpu=%p\n", pVM, pVCpu)); - uint32_t u32XcptBitmap = 0; + uint32_t u32XcptBitmap = pVCpu->hm.s.fGIMTrapXcptUD ? RT_BIT(X86_XCPT_UD) : 0; /* Without Nested Paging, #PF must cause a VM-exit so we can sync our shadow page tables. */ if (!pVM->hm.s.fNestedPaging) @@ -3553,6 +3553,42 @@ /** + * Loads the exception intercepts required for guest execution in the VMCS. + * + * @returns VBox status code. + * @param pVCpu Pointer to the VMCPU. + * @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. + */ +static int hmR0VmxLoadGuestXcptIntercepts(PVMCPU pVCpu, PCPUMCTX pMixedCtx) +{ + NOREF(pMixedCtx); + int rc = VINF_SUCCESS; + if (HMCPU_CF_IS_PENDING(pVCpu, HM_CHANGED_GUEST_XCPT_INTERCEPTS)) + { + /* The remaining exception intercepts are handled elsewhere, e.g. in hmR0VmxLoadSharedCR0(). */ + if (pVCpu->hm.s.fGIMTrapXcptUD) + pVCpu->hm.s.vmx.u32XcptBitmap |= RT_BIT(X86_XCPT_UD); + else + { +#ifndef HMVMX_ALWAYS_TRAP_ALL_XCPTS + pVCpu->hm.s.vmx.u32XcptBitmap &= ~RT_BIT(X86_XCPT_UD); +#endif + } + + rc = VMXWriteVmcs32(VMX_VMCS32_CTRL_EXCEPTION_BITMAP, pVCpu->hm.s.vmx.u32XcptBitmap); + AssertRCReturn(rc, rc); + + HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_XCPT_INTERCEPTS); + Log4(("Load[%RU32]: VMX_VMCS32_CTRL_EXCEPTION_BITMAP=%#RX64 fContextUseFlags=%#RX32\n", pVCpu->idCpu, + pVCpu->hm.s.vmx.u32XcptBitmap, HMCPU_CF_VALUE(pVCpu))); + } + return rc; +} + + +/** * Loads the guest's RIP into the guest-state area in the VMCS. * * @returns VBox status code. @@ -3778,6 +3814,7 @@ /* For now, cleared here as mode-switches can happen outside HM/VT-x. See @bugref{7626} comment #11. */ pVCpu->hm.s.vmx.u32XcptBitmap &= ~HMVMX_REAL_MODE_XCPT_MASK; } + HMCPU_CF_SET(pVCpu, HM_CHANGED_GUEST_XCPT_INTERCEPTS); if (fInterceptNM) pVCpu->hm.s.vmx.u32XcptBitmap |= RT_BIT(X86_XCPT_NM); @@ -3822,11 +3859,9 @@ u32GuestCR0 &= uZapCR0; u32GuestCR0 &= ~(X86_CR0_CD | X86_CR0_NW); /* Always enable caching. */ - /* Write VT-x's view of the guest CR0 into the VMCS and update the exception bitmap. */ + /* Write VT-x's view of the guest CR0 into the VMCS. */ rc = VMXWriteVmcs32(VMX_VMCS_GUEST_CR0, u32GuestCR0); AssertRCReturn(rc, rc); - rc = VMXWriteVmcs32(VMX_VMCS32_CTRL_EXCEPTION_BITMAP, pVCpu->hm.s.vmx.u32XcptBitmap); - AssertRCReturn(rc, rc); Log4(("Load[%RU32]: VMX_VMCS_GUEST_CR0=%#RX32 (uSetCR0=%#RX32 uZapCR0=%#RX32)\n", pVCpu->idCpu, u32GuestCR0, uSetCR0, uZapCR0)); @@ -4219,15 +4254,17 @@ */ if ( fInterceptDB || pVCpu->hm.s.vmx.RealMode.fRealOnV86Active) + { pVCpu->hm.s.vmx.u32XcptBitmap |= RT_BIT(X86_XCPT_DB); + HMCPU_CF_SET(pVCpu, HM_CHANGED_GUEST_XCPT_INTERCEPTS); + } else { #ifndef HMVMX_ALWAYS_TRAP_ALL_XCPTS pVCpu->hm.s.vmx.u32XcptBitmap &= ~RT_BIT(X86_XCPT_DB); + HMCPU_CF_SET(pVCpu, HM_CHANGED_GUEST_XCPT_INTERCEPTS); #endif } - rc = VMXWriteVmcs32(VMX_VMCS32_CTRL_EXCEPTION_BITMAP, pVCpu->hm.s.vmx.u32XcptBitmap); - AssertRCReturn(rc, rc); /* * Update the processor-based VM-execution controls regarding intercepting MOV DRx instructions. @@ -8294,6 +8331,9 @@ rc = hmR0VmxLoadGuestApicState(pVCpu, pMixedCtx); AssertLogRelMsgRCReturn(rc, ("hmR0VmxLoadGuestApicState! rc=%Rrc (pVM=%p pVCpu=%p)\n", rc, pVM, pVCpu), rc); + rc = hmR0VmxLoadGuestXcptIntercepts(pVCpu, pMixedCtx); + AssertLogRelMsgRCReturn(rc, ("hmR0VmxLoadGuestXcptIntercepts! rc=%Rrc (pVM=%p pVCpu=%p)\n", rc, pVM, pVCpu), rc); + /* * Loading Rflags here is fine, even though Rflags.TF might depend on guest debug state (which is not loaded here). * It is re-evaluated and updated if necessary in hmR0VmxLoadSharedState(). @@ -8355,6 +8395,14 @@ HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_LAZY_MSRS); } + /* Loading CR0, debug state might have changed intercepts, update VMCS. */ + if (HMCPU_CF_IS_PENDING(pVCpu, HM_CHANGED_GUEST_XCPT_INTERCEPTS)) + { + int rc = VMXWriteVmcs32(VMX_VMCS32_CTRL_EXCEPTION_BITMAP, pVCpu->hm.s.vmx.u32XcptBitmap); + AssertRC(rc); + HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_XCPT_INTERCEPTS); + } + AssertMsg(!HMCPU_CF_IS_PENDING(pVCpu, HM_CHANGED_HOST_GUEST_SHARED_STATE), ("fContextUseFlags=%#RX32\n", HMCPU_CF_VALUE(pVCpu))); } @@ -10242,8 +10290,7 @@ HMVMX_VALIDATE_EXIT_HANDLER_PARAMS(); STAM_COUNTER_INC(&pVCpu->hm.s.StatExitVmcall); - PVM pVM = pVCpu->CTX_SUFF(pVM); - if (pVM->hm.s.fHypercallsEnabled) + if (pVCpu->hm.s.fHypercallsEnabled) { #if 0 int rc = hmR0VmxSaveGuestState(pVCpu, pMixedCtx); @@ -11404,8 +11451,7 @@ { #ifndef HMVMX_ALWAYS_TRAP_ALL_XCPTS pVCpu->hm.s.vmx.u32XcptBitmap &= ~RT_BIT(X86_XCPT_DB); - rc = VMXWriteVmcs32(VMX_VMCS32_CTRL_EXCEPTION_BITMAP, pVCpu->hm.s.vmx.u32XcptBitmap); - AssertRCReturn(rc, rc); + HMCPU_CF_SET(pVCpu, HM_CHANGED_GUEST_XCPT_INTERCEPTS); #endif } diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR3/GIMHv.cpp virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR3/GIMHv.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR3/GIMHv.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR3/GIMHv.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -632,7 +632,8 @@ { GIMR3Mmio2Unmap(pVM, pRegion); Assert(!pRegion->fMapped); - VMMHypercallsDisable(pVM); + for (VMCPUID i = 0; i < pVM->cCpus; i++) + VMMHypercallsDisable(&pVM->aCpus[i]); LogRel(("GIM: HyperV: Disabled Hypercall-page\n")); return VINF_SUCCESS; } @@ -689,9 +690,10 @@ *pbLast = 0xc3; /* RET */ /* - * Notify VMM that hypercalls are now enabled. + * Notify VMM that hypercalls are now enabled for all VCPUs. */ - VMMHypercallsEnable(pVM); + for (VMCPUID i = 0; i < pVM->cCpus; i++) + VMMHypercallsEnable(&pVM->aCpus[i]); LogRel(("GIM: HyperV: Enabled hypercalls at %#RGp\n", GCPhysHypercallPage)); return VINF_SUCCESS; diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR3/GIMKvm.cpp virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR3/GIMKvm.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR3/GIMKvm.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMR3/GIMKvm.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -142,9 +142,11 @@ } /* - * Setup #UD and hypercall behaviour. + * Setup hypercall and #UD handling. */ - VMMHypercallsEnable(pVM); + for (VMCPUID i = 0; i < pVM->cCpus; i++) + VMMHypercallsEnable(&pVM->aCpus[i]); + if (ASMIsAmdCpu()) { pKvm->fTrapXcptUD = true; @@ -156,6 +158,7 @@ pKvm->fTrapXcptUD = false; pKvm->uOpCodeNative = OP_VMCALL; } + /* We always need to trap VMCALL/VMMCALL hypercall using #UDs for raw-mode VMs. */ if (!HMIsEnabled(pVM)) pKvm->fTrapXcptUD = true; diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp --- virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp 2015-04-09 11:31:41.000000000 +0000 @@ -609,7 +609,7 @@ LogFlow(("TRPMGCTrap06Handler: -> EMInterpretInstructionCPU\n")); rc = EMInterpretInstructionDisasState(pVCpu, &Cpu, pRegFrame, PC, EMCODETYPE_SUPERVISOR); } - else if (GIMShouldTrapXcptUD(pVM)) + else if (GIMShouldTrapXcptUD(pVCpu)) { LogFlow(("TRPMGCTrap06Handler: -> GIMXcptUD\n")); rc = GIMXcptUD(pVCpu, CPUMCTX_FROM_CORE(pRegFrame), &Cpu); diff -Nru virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMSwitcher/LegacyandAMD64.mac virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMSwitcher/LegacyandAMD64.mac --- virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMSwitcher/LegacyandAMD64.mac 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/src/VBox/VMM/VMMSwitcher/LegacyandAMD64.mac 2015-04-09 11:31:41.000000000 +0000 @@ -1269,15 +1269,15 @@ mov cr0, rax mov eax, [rsi + CPUMCTX.fXStateMask] - mov ecx, [rsi + CPUMCTX.pXStateRC] + mov ebx, [rsi + CPUMCTX.pXStateRC] test eax, eax jz .use_fxsave mov edx, [rsi + CPUMCTX.fXStateMask + 4] - o64 xsave [rcx] + o64 xsave [rbx] jmp .done .use_fxsave: - o64 fxsave [rcx] ; (use explicit REX prefix, see @bugref{6398}) + o64 fxsave [rbx] ; (use explicit REX prefix, see @bugref{6398}) .done: mov cr0, rcx ; and restore old CR0 again diff -Nru virtualbox-ose-5.0.0~beta1/tools/bin/gen-slickedit-workspace.sh virtualbox-ose-5.0.0~beta1/tools/bin/gen-slickedit-workspace.sh --- virtualbox-ose-5.0.0~beta1/tools/bin/gen-slickedit-workspace.sh 2015-04-08 11:32:20.000000000 +0000 +++ virtualbox-ose-5.0.0~beta1/tools/bin/gen-slickedit-workspace.sh 2015-04-09 11:31:41.000000000 +0000 @@ -942,7 +942,7 @@ my_generate_project "Net-NetLib" "src/VBox/NetworkServices/NetLib" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/NetLib" # src/VBox/RDP -my_generate_project "RDP-Client" "src/VBox/RDP/client" --begin-incs "include" "src/VBox/RDP/client" --end-includes "src/VBox/RDP/client" +my_generate_project "RDP-Client" "src/VBox/RDP/client-1.8.3" --begin-incs "include" "src/VBox/RDP/client-1.8.3" --end-includes "src/VBox/RDP/client-1.8.3" my_generate_project "RDP-Server" "src/VBox/RDP/server" --begin-incs "include" "src/VBox/RDP/server" --end-includes "src/VBox/RDP/server" my_generate_project "RDP-WebClient" "src/VBox/RDP/webclient" --begin-incs "include" "src/VBox/RDP/webclient" --end-includes "src/VBox/RDP/webclient" my_generate_project "RDP-Misc" "src/VBox/RDP" --begin-incs "include" --end-includes "src/VBox/RDP/auth" "src/VBox/RDP/tscpasswd" "src/VBox/RDP/x11server"