*
* Return a safe temporary directory (i.e. a temporary directory which
* is not prone to symlink attacks, because it is only writable by the
- * current effective user). Guaranteed to return the same directory
- * every time it is called during the lifetime of the current process
- * (unless that directory is deleted while the process is running).
+ * current effective user).
+ *
+ * Guaranteed to return the same directory every time it is
+ * called during the lifetime of the current process, for the
+ * current effective user ID. (Barring the user manually deleting
+ * or renaming the directory.)
*
* Results:
* The allocated directory path on success.
#define BDOOR_CMD_GET_FORCE_X2APIC 76 /* CPL 0 only */
#define BDOOR_CMD_SET_PCI_HOLE 77 /* CPL 0 only */
#define BDOOR_CMD_GET_PCI_HOLE 78 /* CPL 0 only */
-#define BDOOR_CMD_MAX 79
+#define BDOOR_CMD_GET_PCI_BAR 79 /* CPL 0 only */
+#define BDOOR_CMD_MAX 80
/*
char *FileMacos_DiskDeviceToUniqueID(char const *bsdPath);
char *FileMacos_UniqueIDToDiskDevice(char const *identifier);
-
+Bool FileMacOS_MakeSecureLibraryCopies(const char *inDir,
+ const char **dylibName,
+ unsigned numDylibs,
+ char **outDir);
#elif defined VMX86_SERVER
struct FS_PartitionListResult;
LOGLEVEL_VAR(pci_hyper), \
LOGLEVEL_VAR(pcibridge), \
LOGLEVEL_VAR(vide), \
- LOGLEVEL_VAR(ideCdrom), \
+ LOGLEVEL_VAR(atapiCdrom), \
LOGLEVEL_VAR(hostonly), \
LOGLEVEL_VAR(oprom), \
LOGLEVEL_VAR(http), \
LOGLEVEL_VAR(buslogic), \
LOGLEVEL_VAR(lsilogic), \
LOGLEVEL_VAR(pvscsi), \
+ LOGLEVEL_VAR(ahci), \
LOGLEVEL_VAR(diskVmnix), \
LOGLEVEL_VAR(hbaCommon), \
LOGLEVEL_VAR(backdoor), \
* At least:
* impersonate < pollDefault
* keyLocator < preference (for checking AESNI)
- * keyLocator < ssl (bug 743010)
+ * keyLocator < sslState (bug 743010)
* configDb < keyLocator (for unlocking dictionaries)
* battery/button < preference
* workerLib < something for sure under VThread_Create
* licenseCheck < preference
+ * sslState < getSafeTmpDir
*/
#define RANK_vigorTransportListLock (RANK_libLockBase + 0x7010)
-#define RANK_getSafeTmpDirLock (RANK_libLockBase + 0x7020)
#define RANK_batteryLock (RANK_libLockBase + 0x7030)
#define RANK_buttonLock (RANK_libLockBase + 0x7040)
#define RANK_impersonateLock (RANK_libLockBase + 0x7045)
#define RANK_configDbLock (RANK_libLockBase + 0x7070)
#define RANK_keyLocatorLock (RANK_libLockBase + 0x7080)
#define RANK_sslStateLock (RANK_libLockBase + 0x7085)
+#define RANK_getSafeTmpDirLock (RANK_libLockBase + 0x7086)
#define RANK_licenseCheckLock (RANK_libLockBase + 0x7090)
#define RANK_preferenceLock (RANK_libLockBase + 0x7100)
/*
* These describe the format of the message objects.
* This will change when the client/vmx support different
- * structures for the message header. Hopefully, that won't
+ * structures for the message header. Hopefully, that won't
* happen.
*/
#define VIX_COMMAND_MAGIC_WORD 0xd00d0001
* These give upper bounds for how big any VIX IPC meesage
* should be. There are for sanity checks and to ignore maliciously
* large messages that may be part of an DoS attack. The may need to
- * be revised if large messages are added to the protocol.
+ * be revised if large messages are added to the protocol.
*/
-#define VIX_COMMAND_MAX_SIZE (16 * 1024 * 1024)
+#define VIX_COMMAND_MAX_SIZE (16 * 1024 * 1024)
#define VIX_COMMAND_MAX_REQUEST_SIZE 65536
+/*
+ * We don't want to allow guest ops commands with input size too large.
+ * Limit it to the max request size with enough room for the credentials.
+ * Check bugs 824773, 926819 for more details.
+ */
+#define VIX_COMMAND_MAX_USER_INPUT_SIZE (VIX_COMMAND_MAX_REQUEST_SIZE - 5000)
+
/*
* The types of credential we can pass with any request.
*/
# define UNUSED_VARIABLE(_var) (void)_var
#endif
-/*
- * REGPARM defaults to REGPARM3; i.e., a request that gcc
- * put the first three arguments in registers. (It is fine
- * if the function has fewer than three arguments.) Gcc only.
- * Syntactically, put REGPARM where you'd put INLINE or NORETURN.
- *
- * Note that 64-bit code already puts the first six arguments in
- * registers, so these attributes are only useful for 32-bit code.
- */
-
-#if defined(__GNUC__)
-# define REGPARM0 __attribute__((regparm(0)))
-# define REGPARM1 __attribute__((regparm(1)))
-# define REGPARM2 __attribute__((regparm(2)))
-# define REGPARM3 __attribute__((regparm(3)))
-# define REGPARM REGPARM3
-#else
-# define REGPARM0
-# define REGPARM1
-# define REGPARM2
-# define REGPARM3
-# define REGPARM
-#endif
-
-
/*
* gcc can warn us if we're ignoring returns
*/
#define PCI_DEVICE_ID_VMWARE_82546EB 0x0760 /* dual port */
#define PCI_DEVICE_ID_VMWARE_EHCI 0x0770
#define PCI_DEVICE_ID_VMWARE_UHCI 0x0774
-#define PCI_DEVICE_ID_VMWARE_XHCI 0x0778
+#define PCI_DEVICE_ID_VMWARE_XHCI_0096 0x0778
+#define PCI_DEVICE_ID_VMWARE_XHCI_0100 0x0779
#define PCI_DEVICE_ID_VMWARE_1394 0x0780
#define PCI_DEVICE_ID_VMWARE_BRIDGE 0x0790
#define PCI_DEVICE_ID_VMWARE_ROOTPORT 0x07A0
#define PCI_DEVICE_ID_VMWARE_VMXWIFI 0x07B8
#define PCI_DEVICE_ID_VMWARE_PVSCSI 0x07C0
#define PCI_DEVICE_ID_VMWARE_82574 0x07D0
+#define PCI_DEVICE_ID_VMWARE_AHCI 0x07E0
#define PCI_DEVICE_ID_VMWARE_HDAUDIO_CODEC 0x1975
#define PCI_DEVICE_ID_VMWARE_HDAUDIO_CONTROLLER 0x1977
#define PCI_REVISION_NEC_UPD720200 0x03
#define PCI_FIRMWARE_NEC_UPD720200 0x3015
+#define SATA_ID_SERIAL_STR "00000000000000000001" /* Must be 20 Bytes */
+#define SATA_ID_FIRMWARE_STR "00000001" /* Must be 8 Bytes */
+
+#define AHCI_ATA_MODEL_STR PRODUCT_GENERIC_NAME " Virtual SATA Hard Drive"
+#define AHCI_ATAPI_MODEL_STR PRODUCT_GENERIC_NAME " Virtual SATA CDRW Drive"
/************* Strings for IDE Identity Fields **************************/
#define VIDE_ID_SERIAL_STR "00000000000000000001" /* Must be 20 Bytes */
/************* SATA implementation limits ********************************/
#define SATA_MAX_CONTROLLERS 4
#define SATA_MAX_DEVICES 30
+#define AHCI_MIN_PORTS 1
+#define AHCI_MAX_PORTS SATA_MAX_DEVICES
/*
* VSCSI_BV_INTS is the number of uint32's needed for a bit vector
#define VSCSI_BV_INTS CEILING(PVSCSI_MAX_DEVICES, 8 * sizeof (uint32))
#define SCSI_IDE_CHANNEL SCSI_MAX_CONTROLLERS
#define SCSI_IDE_HOSTED_CHANNEL (SCSI_MAX_CONTROLLERS + 1)
-#define SCSI_MAX_CHANNELS (SCSI_MAX_CONTROLLERS + 2)
+#define SCSI_SATA_CHANNEL_FIRST (SCSI_IDE_HOSTED_CHANNEL + 1)
+#define SCSI_MAX_CHANNELS (SCSI_SATA_CHANNEL_FIRST + SATA_MAX_CONTROLLERS)
+
+/************* SCSI-SATA channel IDs********************************/
+#define SATA_ID_TO_SCSI_ID(sataId) \
+ (SCSI_SATA_CHANNEL_FIRST + (sataId))
+
+#define SCSI_ID_TO_SATA_ID(scsiId) \
+ ((scsiId) - SCSI_SATA_CHANNEL_FIRST)
/************* Strings for the VESA BIOS Identity Fields *****************/
#define VBE_OEM_STRING COMPANY_NAME " SVGA"
#define MAX_FLOPPY_DRIVES 2
/************* PCI Passthrough implementation limits ********************/
-#define MAX_PCI_PASSTHRU_DEVICES 6
+#define MAX_PCI_PASSTHRU_DEVICES 16
/************* Test device implementation limits ********************/
-#define MAX_PCI_TEST_DEVICES 2
+#define MAX_PCI_TEST_DEVICES 16
/************* USB implementation limits ********************************/
#define MAX_USB_DEVICES_PER_HOST_CONTROLLER 127
#include "includeCheck.h"
#include "vm_basic_types.h"
+#include "vm_atomic.h"
#include "unicodeTypes.h"
#ifdef _WIN32
Bool W32Util_EnableSafePathSearching(void);
+CRITICAL_SECTION *W32Util_GetSingletonCriticalSection(Atomic_Ptr *csMemory);
+
#endif // _WIN32
#endif // WIN32UTIL_H_