diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/VBox/HGSMI/HGSMI.h | 12 | ||||
| -rw-r--r-- | include/VBox/HostServices/GuestControlSvc.h | 37 | ||||
| -rw-r--r-- | include/VBox/VBoxKeyboard.h | 56 | ||||
| -rw-r--r-- | include/VBox/VBoxVideo.h | 25 | ||||
| -rw-r--r-- | include/VBox/com/Guid.h | 15 | ||||
| -rw-r--r-- | include/VBox/com/array.h | 5 | ||||
| -rw-r--r-- | include/VBox/com/ptr.h | 13 | ||||
| -rw-r--r-- | include/VBox/err.h | 5 | ||||
| -rw-r--r-- | include/VBox/hgcmsvc.h | 8 | ||||
| -rw-r--r-- | include/VBox/intnet.h | 54 | ||||
| -rw-r--r-- | include/VBox/pdmqueue.h | 2 | ||||
| -rw-r--r-- | include/VBox/pgm.h | 2 | ||||
| -rw-r--r-- | include/VBox/settings.h | 10 | ||||
| -rw-r--r-- | include/VBox/tm.h | 21 | ||||
| -rw-r--r-- | include/VBox/usb.h | 2 | ||||
| -rw-r--r-- | include/VBox/vmm.h | 4 | ||||
| -rw-r--r-- | include/iprt/err.h | 3 | ||||
| -rw-r--r-- | include/iprt/manifest.h | 20 | ||||
| -rw-r--r-- | include/iprt/sha.h | 24 |
19 files changed, 270 insertions, 48 deletions
diff --git a/include/VBox/HGSMI/HGSMI.h b/include/VBox/HGSMI/HGSMI.h index 802a89374..a3692185d 100644 --- a/include/VBox/HGSMI/HGSMI.h +++ b/include/VBox/HGSMI/HGSMI.h @@ -240,6 +240,18 @@ DECLINLINE(uint8_t *) HGSMIBufferDataFromOffset (const HGSMIAREA *pArea, HGSMIOF return NULL; } +DECLINLINE(uint8_t *) HGSMIBufferDataAndChInfoFromOffset (const HGSMIAREA *pArea, HGSMIOFFSET offBuffer, uint16_t * pChInfo) +{ + HGSMIBUFFERHEADER *pHeader = HGSMIOffsetToPointer (pArea, offBuffer); + Assert(pHeader); + if(pHeader) + { + *pChInfo = pHeader->u16ChannelInfo; + return HGSMIBufferData(pHeader); + } + return NULL; +} + HGSMICHANNEL *HGSMIChannelFindById (HGSMICHANNELINFO * pChannelInfo, uint8_t u8Channel); uint32_t HGSMIChecksum (HGSMIOFFSET offBuffer, diff --git a/include/VBox/HostServices/GuestControlSvc.h b/include/VBox/HostServices/GuestControlSvc.h index bcda6225d..20b1ab750 100644 --- a/include/VBox/HostServices/GuestControlSvc.h +++ b/include/VBox/HostServices/GuestControlSvc.h @@ -73,16 +73,16 @@ typedef struct _VBoxGuestCtrlCallbackHeader uint32_t u32Magic; /** Context ID to identify callback data. */ uint32_t u32ContextID; -} HOSTCCALLBACKHEADER, *PHOSTCCALLBACKHEADER; +} CALLBACKHEADER, *PCALLBACKHEADER; /** * Data structure to pass to the service extension callback. We use this to * notify the host of changes to properties. */ -typedef struct _VBoxGuestCtrlExecCallbackData +typedef struct _VBoxGuestCtrlCallbackDataExecStatus { /** Callback data header. */ - HOSTCCALLBACKHEADER hdr; + CALLBACKHEADER hdr; /** The process ID (PID). */ uint32_t u32PID; /* The process status. */ @@ -93,12 +93,12 @@ typedef struct _VBoxGuestCtrlExecCallbackData void *pvData; /** Size of optional data buffer (not used atm). */ uint32_t cbData; -} HOSTEXECCALLBACKDATA, *PHOSTEXECCALLBACKDATA; +} CALLBACKDATAEXECSTATUS, *PCALLBACKDATAEXECSTATUS; -typedef struct _VBoxGuestCtrlExecOutCallbackData +typedef struct _VBoxGuestCtrlCallbackDataExecOut { /** Callback data header. */ - HOSTCCALLBACKHEADER hdr; + CALLBACKHEADER hdr; /** The process ID (PID). */ uint32_t u32PID; /* The handle ID (stdout/stderr). */ @@ -109,14 +109,22 @@ typedef struct _VBoxGuestCtrlExecOutCallbackData void *pvData; /** Size of optional data buffer. */ uint32_t cbData; -} HOSTEXECOUTCALLBACKDATA, *PHOSTEXECOUTCALLBACKDATA; +} CALLBACKDATAEXECOUT, *PCALLBACKDATAEXECOUT; + +typedef struct _VBoxGuestCtrlCallbackDataClientDisconnected +{ + /** Callback data header. */ + CALLBACKHEADER hdr; +} CALLBACKDATACLIENTDISCONNECTED, *PCALLBACKDATACLIENTDISCONNECTED; enum { - /** Magic number for sanity checking the HOSTEXECCALLBACKDATA structure. */ - HOSTEXECCALLBACKDATAMAGIC = 0x26011982, - /** Magic number for sanity checking the HOSTEXECOUTCALLBACKDATA structure. */ - HOSTEXECOUTCALLBACKDATAMAGIC = 0x11061949 + /** Magic number for sanity checking the CALLBACKDATACLIENTDISCONNECTED structure. */ + CALLBACKDATAMAGICCLIENTDISCONNECTED = 0x08041984, + /** Magic number for sanity checking the CALLBACKDATAEXECSTATUS structure. */ + CALLBACKDATAMAGICEXECSTATUS = 0x26011982, + /** Magic number for sanity checking the CALLBACKDATAEXECOUT structure. */ + CALLBACKDATAMAGICEXECOUT = 0x11061949 }; enum eVBoxGuestCtrlCallbackType @@ -159,12 +167,17 @@ enum eGuestFn */ GUEST_GET_HOST_MSG = 1, /** - * Guest asks the host to cancel all pending waits the guest waits on. + * Guest asks the host to cancel all pending waits the guest itself waits on. * This becomes necessary when the guest wants to quit but still waits for * commands from the host. */ GUEST_CANCEL_PENDING_WAITS = 2, /** + * Guest disconnected (terminated normally or due to a crash HGCM + * detected when calling service::clientDisconnect(). + */ + GUEST_DISCONNECTED = 3, + /** * TODO */ GUEST_EXEC_SEND_OUTPUT = 100, diff --git a/include/VBox/VBoxKeyboard.h b/include/VBox/VBoxKeyboard.h new file mode 100644 index 000000000..06d669600 --- /dev/null +++ b/include/VBox/VBoxKeyboard.h @@ -0,0 +1,56 @@ +/** @file + * + * VBox frontends: Qt GUI ("VirtualBox"): + * X11 keyboard driver interface + * + */ + +/* + * 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.1 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* + * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice + * other than GPL or LGPL is available it will apply instead, Sun elects to use only + * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where + * a choice of LGPL license versions is made available with the language indicating + * that LGPLv2 or any later version may be used, or where a choice of which version + * of the LGPL is applied is otherwise unspecified. + */ + +#ifndef __H_KEYBOARD +#define __H_KEYBOARD + +#include <X11/Xlib.h> + +/* Exported definitions */ +#undef CCALL +#ifdef __cplusplus +# define CCALL "C" +#else +# define CCALL +#endif +#ifdef VBOX_HAVE_VISIBILITY_HIDDEN +extern CCALL __attribute__((visibility("default"))) unsigned *X11DRV_getKeyc2scan(void); +extern CCALL __attribute__((visibility("default"))) unsigned X11DRV_InitKeyboard(Display *dpy, unsigned *byLayoutOK, unsigned *byTypeOK, int (*remapScancodes)[2]); +extern CCALL __attribute__((visibility("default"))) unsigned X11DRV_KeyEvent(Display *dpy, KeyCode code); +#else +extern CCALL unsigned *X11DRV_getKeyc2scan(void); +extern CCALL unsigned X11DRV_InitKeyboard(Display *dpy, unsigned *byLayoutOK, unsigned *byTypeOK, int (*remapScancodes)[2]); +extern CCALL unsigned X11DRV_KeyEvent(Display *dpy, KeyCode code); +#endif + +#endif /* __H_KEYBOARD */ + diff --git a/include/VBox/VBoxVideo.h b/include/VBox/VBoxVideo.h index 8f06122c1..bb5a3527f 100644 --- a/include/VBox/VBoxVideo.h +++ b/include/VBox/VBoxVideo.h @@ -281,6 +281,9 @@ typedef enum VBOXVHWACMD_TYPE_DISABLE, VBOXVHWACMD_TYPE_HH_CONSTRUCT, VBOXVHWACMD_TYPE_HH_RESET +#ifdef VBOXWDDM + , VBOXVHWACMD_TYPE_SURF_GETINFO +#endif } VBOXVHWACMD_TYPE; /* the command processing was asynch, set by the host to indicate asynch command completion @@ -323,7 +326,7 @@ typedef struct _VBOXVHWACMD #define VBOXVHWACMD_SIZE(_tCmd) (VBOXVHWACMD_SIZE_FROMBODYSIZE(sizeof(_tCmd))) typedef unsigned int VBOXVHWACMD_LENGTH; typedef uint64_t VBOXVHWA_SURFHANDLE; -#define VBOXVHWA_SURFHANDLE_INVALID 0 +#define VBOXVHWA_SURFHANDLE_INVALID 0ULL #define VBOXVHWACMD_BODY(_p, _t) ((_t*)(_p)->body) #define VBOXVHWACMD_HEAD(_pb) ((VBOXVHWACMD*)((uint8_t *)(_pb) - RT_OFFSETOF(VBOXVHWACMD, body))) @@ -606,6 +609,13 @@ typedef struct _VBOXVHWACMD_SURF_CREATE VBOXVHWA_SURFACEDESC SurfInfo; } VBOXVHWACMD_SURF_CREATE; +#ifdef VBOXWDDM +typedef struct _VBOXVHWACMD_SURF_GETINFO +{ + VBOXVHWA_SURFACEDESC SurfInfo; +} VBOXVHWACMD_SURF_GETINFO; +#endif + typedef struct _VBOXVHWACMD_SURF_DESTROY { union @@ -811,6 +821,7 @@ typedef struct _VBVABUFFER # define VBVA_VDMA_CTL 10 /* setup G<->H DMA channel info */ # define VBVA_VDMA_CMD 11 /* G->H DMA command */ #endif +#define VBVA_INFO_CAPS 12 /* informs host about HGSMI caps. see _VBVACAPS below */ /* host->guest commands */ # define VBVAHG_EVENT 1 @@ -946,6 +957,8 @@ typedef struct VBVAINFOSCREEN #ifdef VBOXWDDM_WITH_VBVA /* extended VBVA to be used with WDDM */ #define VBVA_F_EXTENDED 0x00000004 +/* vbva offset is absolute VRAM offset */ +#define VBVA_F_ABSOFFSET 0x00000008 #endif typedef struct _VBVAENABLE @@ -1013,6 +1026,16 @@ typedef struct _VBVAMOUSEPOINTERSHAPE } VBVAMOUSEPOINTERSHAPE; +/* the guest driver can handle asynch guest cmd completion by reading the command offset from io port */ +#define VBVACAPS_COMPLETEGCMD_BY_IOREAD 0x00000001 +/* the guest driver can handle video adapter IRQs */ +#define VBVACAPS_IRQ 0x00000002 +typedef struct _VBVACAPS +{ + int32_t rc; + uint32_t fCaps; +} VBVACAPS; + #pragma pack() #endif /* VBOX_WITH_HGSMI */ diff --git a/include/VBox/com/Guid.h b/include/VBox/com/Guid.h index 59448dacc..c84adac6a 100644 --- a/include/VBox/com/Guid.h +++ b/include/VBox/com/Guid.h @@ -1,4 +1,4 @@ -/* $Id: Guid.h 28800 2010-04-27 08:22:32Z vboxsync $ */ +/* $Id: Guid.h 29873 2010-05-28 17:14:53Z vboxsync $ */ /** @file * MS COM / XPCOM Abstraction Layer: @@ -140,6 +140,19 @@ public: return Utf8Str(buf); } + /** + * Like toString, but encloses the returned string in curly brackets. + * @return + */ + Utf8Str toStringCurly() const + { + char buf[RTUUID_STR_LENGTH + 2] = "{"; + ::RTUuidToStr(&uuid, buf + 1, RTUUID_STR_LENGTH); + buf[sizeof(buf) - 2] = '}'; + buf[sizeof(buf) - 1] = '\0'; + return Utf8Str(buf); + } + Bstr toUtf16() const { if (isEmpty()) diff --git a/include/VBox/com/array.h b/include/VBox/com/array.h index 755e5155e..128d32233 100644 --- a/include/VBox/com/array.h +++ b/include/VBox/com/array.h @@ -711,6 +711,11 @@ public: bool isNull() const { return m.arr == NULL; } /** + * Returns @c true if this instance does not represents a null array. + */ + bool isNotNull() const { return m.arr != NULL; } + + /** * Resets this instance to null and, if this instance is not a weak one, * releases any resources occupied by the array data. * diff --git a/include/VBox/com/ptr.h b/include/VBox/com/ptr.h index 968e7d4ac..e5122e491 100644 --- a/include/VBox/com/ptr.h +++ b/include/VBox/com/ptr.h @@ -201,6 +201,11 @@ public: return (p == NULL); } + bool isNotNull() const + { + return (p != NULL); + } + bool operator!() const { return isNull(); } bool operator<(C* that_p) const { return p < that_p; } @@ -225,11 +230,15 @@ public: * Dereferences the instance (redirects the -> operator to the managed * pointer). */ +#ifndef IN_SLICKEDIT NoAddRefRelease<C>* operator->() const { AssertMsg(p, ("Managed pointer must not be null\n")); return (NoAddRefRelease<C>*)p; } +#else /* IN_SLICKEDIT - The editor doesn't quite grok the above magic, sorry about the mess. */ + C *operator->() const { return this->p; } +#endif template <class I> HRESULT queryInterfaceTo(I **pp) const @@ -491,6 +500,10 @@ public: return *this; } +#ifdef IN_SLICKEDIT /* Doesn't fully grok the stuff otherwise, sorry for the bloat. */ + C *operator->() const { return this->p; } +#endif + /** * Creates a new server-side object of the given component class and * immediately starts to manage a pointer to the created object (the diff --git a/include/VBox/err.h b/include/VBox/err.h index 8481f2e22..9d16cc0fb 100644 --- a/include/VBox/err.h +++ b/include/VBox/err.h @@ -627,6 +627,9 @@ #define VERR_SSM_FIELD_INVALID_PADDING_SIZE (-1869) /** The field contains a value that is out of range. */ #define VERR_SSM_FIELD_INVALID_VALUE (-1870) +/** Generic stream error. */ +#define VERR_SSM_STREAM_ERROR (-1871) + /** @} */ @@ -1297,6 +1300,8 @@ #define VERR_INTNET_INCOMPATIBLE_TRUNK (-3603) /** The network already exists with a different security profile (restricted / public). */ #define VERR_INTNET_INCOMPATIBLE_FLAGS (-3604) +/** Failed to create a virtual network interface instance. */ +#define VERR_INTNET_FLT_VNIC_CREATE_FAILED (-3605) /** @} */ diff --git a/include/VBox/hgcmsvc.h b/include/VBox/hgcmsvc.h index a896d0154..0a7adcdfe 100644 --- a/include/VBox/hgcmsvc.h +++ b/include/VBox/hgcmsvc.h @@ -240,6 +240,14 @@ typedef struct VBOXHGCMSVCPARM u.pointer.size = cb; } + /** Set a const string value to an HGCM parameter structure */ + void setString(const char *psz) + { + type = VBOX_HGCM_SVC_PARM_PTR; + u.pointer.addr = (void *)psz; + u.pointer.size = (uint32_t)strlen(psz) + 1; + } + #ifdef VBOX_TEST_HGCM_PARMS /** Test the getString member function. Indirectly tests the getPointer * and getBuffer APIs. diff --git a/include/VBox/intnet.h b/include/VBox/intnet.h index cbd3704f6..1b10876eb 100644 --- a/include/VBox/intnet.h +++ b/include/VBox/intnet.h @@ -421,6 +421,8 @@ typedef struct INTNETTRUNKSWPORT * false if it should hit the wire/host. * * @param pSwitchPort Pointer to this structure. + * @param pvIf Pointer to the interface which received this frame + * if available. Can be NULL. * @param pSG The (scatter /) gather structure for the frame. This * will only be use during the call, so a temporary one can * be used. The Phys member will not be used. @@ -436,7 +438,7 @@ typedef struct INTNETTRUNKSWPORT * If so, we'll add a callback to INTNETTRUNKIFPORT for this * (pfnSGModifying) and a SG flag. */ - DECLR0CALLBACKMEMBER(bool, pfnRecv,(PINTNETTRUNKSWPORT pSwitchPort, PINTNETSG pSG, uint32_t fSrc)); + DECLR0CALLBACKMEMBER(bool, pfnRecv,(PINTNETTRUNKSWPORT pSwitchPort, void *pvIf, PINTNETSG pSG, uint32_t fSrc)); /** * Retain a SG. @@ -650,33 +652,41 @@ typedef struct INTNETTRUNKIFPORT * Notifies when the MAC address of an interface is set or changes. * * @param pIfPort Pointer to this structure. - * @param hIf The handle of the network interface. + * @param pvIfData Pointer to the trunk's interface data (see + * pfnConnectInterface). * @param pMac Pointer to the MAC address of the connecting VM NIC. * * @remarks Only busy references to the trunk and the interface. */ - DECLR0CALLBACKMEMBER(void, pfnNotifyMacAddress,(PINTNETTRUNKIFPORT pIfPort, INTNETIFHANDLE hIf, PCRTMAC pMac)); + DECLR0CALLBACKMEMBER(void, pfnNotifyMacAddress,(PINTNETTRUNKIFPORT pIfPort, void *pvIfData, PCRTMAC pMac)); /** * Called when an interface is connected to the network. * * @returns IPRT status code. * @param pIfPort Pointer to this structure. - * @param hIf The handle of the network interface. + * @param pvIf Opaque pointer to the interface being connected. + * For use INTNETTRUNKSWPORT::pfnRecv. + * @param ppvIfData Pointer to a pointer variable that the trunk + * implementation can use to associate data with the + * interface. This pointer will be passed to the + * pfnXmit, pfnNotifyMacAddress and + * pfnDisconnectInterface methods. * * @remarks Owns the big mutex. No racing pfnDisconnectAndRelease. */ - DECLR0CALLBACKMEMBER(int, pfnConnectInterface,(PINTNETTRUNKIFPORT pIfPort, INTNETIFHANDLE hIf)); + DECLR0CALLBACKMEMBER(int, pfnConnectInterface,(PINTNETTRUNKIFPORT pIfPort, void *pvIf, void **ppvIfData)); /** * Called when an interface is disconnected from the network. * * @param pIfPort Pointer to this structure. - * @param hIf The handle of the network interface. + * @param pvIfData Pointer to the trunk's interface data (see + * pfnConnectInterface). * * @remarks Owns the big mutex. No racing pfnDisconnectAndRelease. */ - DECLR0CALLBACKMEMBER(void, pfnDisconnectInterface,(PINTNETTRUNKIFPORT pIfPort, INTNETIFHANDLE hIf)); + DECLR0CALLBACKMEMBER(void, pfnDisconnectInterface,(PINTNETTRUNKIFPORT pIfPort, void *pvIfData)); /** * Waits for the interface to become idle. @@ -700,6 +710,8 @@ typedef struct INTNETTRUNKIFPORT * * @return VBox status code. Error generally means we'll drop the frame. * @param pIfPort Pointer to this structure. + * @param pvIfData Pointer to the trunk's interface data (see + * pfnConnectInterface). * @param pSG Pointer to the (scatter /) gather structure for the frame. * This may or may not be a temporary buffer. If it's temporary * the transmit operation(s) then it's required to make a copy @@ -708,7 +720,7 @@ typedef struct INTNETTRUNKIFPORT * * @remarks No locks. May be called concurrently on several threads. */ - DECLR0CALLBACKMEMBER(int, pfnXmit,(PINTNETTRUNKIFPORT pIfPort, PINTNETSG pSG, uint32_t fDst)); + DECLR0CALLBACKMEMBER(int, pfnXmit,(PINTNETTRUNKIFPORT pIfPort, void *pvIfData, PINTNETSG pSG, uint32_t fDst)); /** Structure version number. (INTNETTRUNKIFPORT_VERSION) */ uint32_t u32VersionEnd; @@ -766,7 +778,7 @@ typedef struct INTNETTRUNKFACTORY typedef INTNETTRUNKFACTORY *PINTNETTRUNKFACTORY; /** The UUID for the (current) trunk factory. (case sensitive) */ -#define INTNETTRUNKFACTORY_UUID_STR "2dbd031b-ef53-4c11-a648-9a319da36aa6" +#define INTNETTRUNKFACTORY_UUID_STR "de504d93-1d1e-4781-8b73-6ea39a0e36a2" /** @name INTNETTRUNKFACTORY::pfnCreateAndConnect flags. * @{ */ @@ -1032,6 +1044,29 @@ typedef INTNETIFWAITREQ *PINTNETIFWAITREQ; INTNETR0DECL(int) IntNetR0IfWaitReq(PSUPDRVSESSION pSession, PINTNETIFWAITREQ pReq); +/** + * Request buffer for IntNetR0IfAbortWaitReq / VMMR0_DO_INTNET_IF_ABORT_WAIT. + * @see IntNetR0IfAbortWait. + */ +typedef struct INTNETIFABORTWAITREQ +{ + /** The request header. */ + SUPVMMR0REQHDR Hdr; + /** Alternative to passing the taking the session from the VM handle. + * Either use this member or use the VM handle, don't do both. */ + PSUPDRVSESSION pSession; + /** Handle to the interface. */ + INTNETIFHANDLE hIf; + /** Set this to fend off all future IntNetR0Wait calls. */ + bool fNoMoreWaits; +} INTNETIFABORTWAITREQ; +/** Pointer to an IntNetR0IfAbortWaitReq / VMMR0_DO_INTNET_IF_ABORT_WAIT + * request buffer. */ +typedef INTNETIFABORTWAITREQ *PINTNETIFABORTWAITREQ; + +INTNETR0DECL(int) IntNetR0IfAbortWaitReq(PSUPDRVSESSION pSession, PINTNETIFABORTWAITREQ pReq); + + #if defined(IN_RING0) || defined(IN_INTNET_TESTCASE) /** @name * @{ @@ -1052,6 +1087,7 @@ INTNETR0DECL(int) IntNetR0IfSetMacAddress(INTNETIFHANDLE hIf, PSUPDRVSESSI INTNETR0DECL(int) IntNetR0IfSetActive(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, bool fActive); INTNETR0DECL(int) IntNetR0IfSend(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession); INTNETR0DECL(int) IntNetR0IfWait(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, uint32_t cMillies); +INTNETR0DECL(int) IntNetR0IfAbortWait(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession); /** @} */ #endif /* IN_RING0 */ diff --git a/include/VBox/pdmqueue.h b/include/VBox/pdmqueue.h index 3a5a6d452..0724ad4aa 100644 --- a/include/VBox/pdmqueue.h +++ b/include/VBox/pdmqueue.h @@ -130,9 +130,7 @@ VMMR3DECL(int) PDMR3QueueDestroy(PPDMQUEUE pQueue); VMMR3DECL(int) PDMR3QueueDestroyDevice(PVM pVM, PPDMDEVINS pDevIns); VMMR3DECL(int) PDMR3QueueDestroyDriver(PVM pVM, PPDMDRVINS pDrvIns); VMMR3DECL(void) PDMR3QueueFlushAll(PVM pVM); -VMMR3DECL(void) PDMR3QueueFlushWorker(PVM pVM, PPDMQUEUE pQueue); -VMMDECL(void) PDMQueueFlush(PPDMQUEUE pQueue); VMMDECL(PPDMQUEUEITEMCORE) PDMQueueAlloc(PPDMQUEUE pQueue); VMMDECL(void) PDMQueueInsert(PPDMQUEUE pQueue, PPDMQUEUEITEMCORE pItem); VMMDECL(void) PDMQueueInsertEx(PPDMQUEUE pQueue, PPDMQUEUEITEMCORE pItem, uint64_t NanoMaxDelay); diff --git a/include/VBox/pgm.h b/include/VBox/pgm.h index 866a99769..6ba552fad 100644 --- a/include/VBox/pgm.h +++ b/include/VBox/pgm.h @@ -433,7 +433,7 @@ VMMDECL(void) PGMSetLargePageUsage(PVM pVM, bool fUseLargePages); */ VMMR0DECL(int) PGMR0PhysAllocateHandyPages(PVM pVM, PVMCPU pVCpu); VMMR0DECL(int) PGMR0PhysAllocateLargeHandyPage(PVM pVM, PVMCPU pVCpu); -VMMR0DECL(int) PGMR0SharedModuleCheckRegion(PVM pVM, VMCPUID idCpu, PGMMSHAREDMODULE pModule, PGVM pGVM); +VMMR0DECL(int) PGMR0SharedModuleCheck(PVM pVM, VMCPUID idCpu, PGMMSHAREDMODULE pModule, PGVM pGVM); VMMR0DECL(int) PGMR0Trap0eHandlerNestedPaging(PVM pVM, PVMCPU pVCpu, PGMMODE enmShwPagingMode, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPHYS pvFault); # ifdef VBOX_WITH_2X_4GB_ADDR_SPACE VMMR0DECL(int) PGMR0DynMapInit(void); diff --git a/include/VBox/settings.h b/include/VBox/settings.h index 1819e4758..ca48fc0c0 100644 --- a/include/VBox/settings.h +++ b/include/VBox/settings.h @@ -92,7 +92,6 @@ protected: const com::Utf8Str &str) const; com::Utf8Str makeString(const RTTIMESPEC &tm); - com::Utf8Str makeString(const com::Guid &guid); void readExtraData(const xml::ElementNode &elmExtraData, ExtraDataItemsMap &map); @@ -879,7 +878,9 @@ public: BuildMachineXML_WriteVboxVersionAttribute = 0x02, BuildMachineXML_SkipRemovableMedia = 0x02 }; - void buildMachineXML(xml::ElementNode &elmMachine, uint32_t fl); + void buildMachineXML(xml::ElementNode &elmMachine, + uint32_t fl, + std::list<xml::ElementNode*> *pllElementsWithUuidAttributes); private: void readNetworkAdapters(const xml::ElementNode &elmHardware, NetworkAdaptersList &ll); @@ -900,7 +901,10 @@ private: void buildHardwareXML(xml::ElementNode &elmParent, const Hardware &hw, const Storage &strg); void buildNetworkXML(NetworkAttachmentType_T mode, xml::ElementNode &elmParent, const NetworkAdapter &nic); - void buildStorageControllersXML(xml::ElementNode &elmParent, const Storage &st, bool fSkipRemovableMedia); + void buildStorageControllersXML(xml::ElementNode &elmParent, + const Storage &st, + bool fSkipRemovableMedia, + std::list<xml::ElementNode*> *pllElementsWithUuidAttributes); void buildSnapshotXML(xml::ElementNode &elmParent, const Snapshot &snap); void bumpSettingsVersionIfNeeded(); diff --git a/include/VBox/tm.h b/include/VBox/tm.h index f181514ea..5af960362 100644 --- a/include/VBox/tm.h +++ b/include/VBox/tm.h @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2006-2007 Oracle Corporation + * 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; @@ -51,17 +51,20 @@ typedef enum TMCLOCK * This clock ticks all the time, so use with care. */ TMCLOCK_REAL = 0, /** Virtual guest time. - * This clock only ticks when the guest is running. It's implemented - * as an offset to real time. */ + * This clock only ticks when the guest is running. It's implemented + * as an offset to monotonic real time (GIP). */ TMCLOCK_VIRTUAL, /** Virtual guest synchronized timer time. - * This is a special clock and timer queue for synchronizing virtual timers and - * virtual time sources. This clock is trying to keep up with TMCLOCK_VIRTUAL, - * but will wait for timers to be executed. If it lags too far behind TMCLOCK_VIRTUAL, - * it will try speed up to close the distance. - * @remarks Do not use this unless you *must*. */ + * This is a special clock and timer queue for synchronizing virtual timers + * and virtual time sources. This clock is trying to keep up with + * TMCLOCK_VIRTUAL, but will wait for timers to be executed. If it lags + * too far behind TMCLOCK_VIRTUAL, it will try speed up to close the + * distance. + * @remarks Do not use this unless you really *must*. */ TMCLOCK_VIRTUAL_SYNC, - /** Virtual CPU timestamp. (Running only when we're executing guest code.) */ + /** Virtual CPU timestamp. + * By default this is a function of TMCLOCK_VIRTUAL_SYNC and the virtual + * CPU frequency. */ TMCLOCK_TSC, /** Number of clocks. */ TMCLOCK_MAX diff --git a/include/VBox/usb.h b/include/VBox/usb.h index e327ad481..db648c7a4 100644 --- a/include/VBox/usb.h +++ b/include/VBox/usb.h @@ -117,7 +117,7 @@ typedef struct USBDEVICE uint8_t bBus; /** The port number. */ uint8_t bPort; -#if defined(RT_OS_LINUX) +#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) /** Device number. */ uint8_t bDevNum; #endif diff --git a/include/VBox/vmm.h b/include/VBox/vmm.h index 5ab5dd94f..2834e4daf 100644 --- a/include/VBox/vmm.h +++ b/include/VBox/vmm.h @@ -80,8 +80,6 @@ typedef enum VMMCALLRING3 VMMCALLRING3_INVALID = 0, /** Acquire the PDM lock. */ VMMCALLRING3_PDM_LOCK, - /** Call PDMR3QueueFlushWorker. */ - VMMCALLRING3_PDM_QUEUE_FLUSH, /** Acquire the PGM lock. */ VMMCALLRING3_PGM_LOCK, /** Grow the PGM shadow page pool. */ @@ -342,6 +340,8 @@ typedef enum VMMR0OPERATION VMMR0_DO_INTNET_IF_SEND, /** Call IntNetR0IfWait(). */ VMMR0_DO_INTNET_IF_WAIT, + /** Call IntNetR0IfAbortWait(). */ + VMMR0_DO_INTNET_IF_ABORT_WAIT, /** The end of the R0 service operations. */ VMMR0_DO_SRV_END, diff --git a/include/iprt/err.h b/include/iprt/err.h index fdfc87971..1fbdd88c7 100644 --- a/include/iprt/err.h +++ b/include/iprt/err.h @@ -618,6 +618,9 @@ RTDECL(PCRTCOMERRMSG) RTErrCOMGet(uint32_t rc); #define VERR_NO_CHANGE (-95) /** Generic no change info. */ #define VINF_NO_CHANGE 95 +/** Out of memory condition when allocating executable memory. */ +#define VERR_NO_EXEC_MEMORY (-96) + /** @} */ diff --git a/include/iprt/manifest.h b/include/iprt/manifest.h index 3cda84e7a..e2820059a 100644 --- a/include/iprt/manifest.h +++ b/include/iprt/manifest.h @@ -51,6 +51,18 @@ typedef struct RTMANIFESTTEST typedef RTMANIFESTTEST* PRTMANIFESTTEST; /** + * Manifest progress callback. + * + * @returns IPRT status code. + * + * @param uPercent The progress completion percentage. + * @param pvUser The user defined parameter. + */ +typedef DECLCALLBACK(int) FNRTMANIFESTPROGRESS(unsigned uPercent, void *pvUser); +/** Pointer to a manifest progress callback. */ +typedef FNRTMANIFESTPROGRESS *PFNRTMANIFESTPROGRESS; + +/** * Verify the given SHA1 digests against the entries in the manifest file. * * Please note that not only the various digest have to match, but the @@ -81,8 +93,10 @@ RTR3DECL(int) RTManifestVerify(const char *pszManifestFile, PRTMANIFESTTEST paTe * @param piFailed A index to papszFiles in the * VERR_MANIFEST_DIGEST_MISMATCH error case * (optional). + * @param pfnProgressCallback optional callback for the progress indication + * @param pvUser user defined pointer for the callback */ -RTR3DECL(int) RTManifestVerifyFiles(const char *pszManifestFile, const char * const *papszFiles, size_t cFiles, size_t *piFailed); +RTR3DECL(int) RTManifestVerifyFiles(const char *pszManifestFile, const char * const *papszFiles, size_t cFiles, size_t *piFailed, PFNRTMANIFESTPROGRESS pfnProgressCallback, void *pvUser); /** * Creates a manifest file for a set of files. The manifest file contains SHA1 @@ -94,8 +108,10 @@ RTR3DECL(int) RTManifestVerifyFiles(const char *pszManifestFile, const char * co * @param pszManifestFile Filename of the manifest file to create. * @param papszFiles Array of files to create SHA1 sums for. * @param cFiles Number of entries in papszFiles. + * @param pfnProgressCallback optional callback for the progress indication + * @param pvUser user defined pointer for the callback */ -RTR3DECL(int) RTManifestWriteFiles(const char *pszManifestFile, const char * const *papszFiles, size_t cFiles); +RTR3DECL(int) RTManifestWriteFiles(const char *pszManifestFile, const char * const *papszFiles, size_t cFiles, PFNRTMANIFESTPROGRESS pfnProgressCallback, void *pvUser); /** @} */ diff --git a/include/iprt/sha.h b/include/iprt/sha.h index d530f94f0..15689f6d3 100644 --- a/include/iprt/sha.h +++ b/include/iprt/sha.h @@ -35,10 +35,22 @@ RT_C_DECLS_BEGIN * @{ */ +/** + * SHA progress callback. + * + * @returns IPRT status code. + * + * @param uPercent The progress completion percentage. + * @param pvUser The user defined parameter. + */ +typedef DECLCALLBACK(int) FNRTSHAPROGRESS(unsigned uPercent, void *pvUser); +/** Pointer to a SHA progress callback. */ +typedef FNRTSHAPROGRESS *PFNRTSHAPROGRESS; + /** The size of a SHA-1 hash. */ #define RTSHA1_HASH_SIZE 20 /** The length of a SHA-1 digest string. The terminator is not included. */ -#define RTSHA1_DIGEST_LEN (40+1) +#define RTSHA1_DIGEST_LEN (40) /** * SHA-1 context. @@ -89,7 +101,7 @@ RTDECL(void) RTSha1Update(PRTSHA1CONTEXT pCtx, const void *pvBuf, size_t cbBuf); RTDECL(void) RTSha1Final(PRTSHA1CONTEXT pCtx, uint8_t pabDigest[RTSHA1_HASH_SIZE]); /** - * Converts a SHA-512 hash to a digest string. + * Converts a SHA-1 hash to a digest string. * * @returns IPRT status code. * @@ -117,10 +129,12 @@ RTDECL(int) RTSha1FromString(char const *pszDigest, uint8_t pabDigest[RTSHA1_HAS * * @returns iprt status code. * - * @param pszFile Filename to create a SHA1 digest for. - * @param ppszDigest On success the SHA1 digest. + * @param pszFile Filename to create a SHA1 digest for. + * @param ppszDigest On success the SHA1 digest. + * @param pfnProgressCallback optional callback for the progress indication + * @param pvUser user defined pointer for the callback */ -RTR3DECL(int) RTSha1Digest(const char *pszFile, char **ppszDigest); +RTR3DECL(int) RTSha1Digest(const char *pszFile, char **ppszDigest, PFNRTSHAPROGRESS pfnProgressCallback, void *pvUser); |
