SUPLib-solaris.cpp revision 2456bf2fd0d999aec48bbfeeb60de9005aaf2f6e
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync/* $Id$ */
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync/** @file
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * VirtualBox Support Library - Solaris specific parts.
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync */
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync/*
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync *
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * available from http://www.virtualbox.org. This file is free software;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * you can redistribute it and/or modify it under the terms of the GNU
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * General Public License (GPL) as published by the Free Software
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync *
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * The contents of this file may alternatively be used under the terms
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * of the Common Development and Distribution License Version 1.0
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * VirtualBox OSE distribution, in which case the provisions of the
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * CDDL are applicable instead of those of the GPL.
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync *
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * You may elect to license modified versions of this file under the
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * terms and conditions of either the GPL or the CDDL or both.
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync *
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * additional information or have any questions.
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync */
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync/*******************************************************************************
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync* Header Files *
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync*******************************************************************************/
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#define LOG_GROUP LOG_GROUP_SUP
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#ifdef IN_SUP_HARDENED_R3
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync# undef DEBUG /* Warning: disables RT_STRICT */
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync# define LOG_DISABLED
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync /** @todo RTLOGREL_DISABLED */
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync# include <iprt/log.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync# undef LogRelIt
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync# define LogRelIt(pvInst, fFlags, iGroup, fmtargs) do { } while (0)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#endif
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <VBox/types.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <VBox/sup.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <VBox/param.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <VBox/err.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <VBox/log.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <iprt/path.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <iprt/assert.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <iprt/mem.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <iprt/err.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <iprt/string.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include "../SUPLibInternal.h"
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include "../SUPDrvIOC.h"
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <sys/fcntl.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <sys/ioctl.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <fcntl.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <errno.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <unistd.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <sys/mman.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <stdlib.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#include <stdio.h>
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync/*******************************************************************************
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync* Defined Constants And Macros *
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync*******************************************************************************/
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync/** Solaris device link. */
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#define DEVICE_NAME "/dev/vboxdrv"
68fb2428898c55a7172e6a75a0a8d7ce259919bdvboxsync
68fb2428898c55a7172e6a75a0a8d7ce259919bdvboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsyncint suplibOsInit(PSUPLIBDATA pThis, bool fPreInited)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync{
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync /*
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync * Nothing to do if pre-inited.
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync */
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync if (fPreInited)
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync return VINF_SUCCESS;
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync#ifdef VBOXFLT_DUMMYFILES
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync /*
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync * Open dummy files to preallocate file descriptors, see #4650.
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync */
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync for (int i = 0; i < VBOXFLT_DUMMYFILES; i++)
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync {
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync int hDummy = open("/dev/null", O_RDWR, 0);
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync fcntl(hDummy, F_SETFD, FD_CLOEXEC);
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync if (hDummy >= 0)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync pThis->hDummy[i] = hDummy;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync else
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync {
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync pThis->hDummy[i] = -1;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync LogRel(("Failed to open[%d] /dev/null! errno=%d\n", i, errno));
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync }
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync }
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#endif
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync /*
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * Try to open the device.
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync */
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync int hDevice = open(DEVICE_NAME, O_RDWR, 0);
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync if (hDevice < 0)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync {
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync int rc;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync switch (errno)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync {
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync case ENODEV: rc = VERR_VM_DRIVER_LOAD_ERROR; break;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync case EPERM:
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync case EACCES: rc = VERR_VM_DRIVER_NOT_ACCESSIBLE; break;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync case ENOENT: rc = VERR_VM_DRIVER_NOT_INSTALLED; break;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync default: rc = VERR_VM_DRIVER_OPEN_ERROR; break;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync }
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync LogRel(("Failed to open \"%s\", errno=%d, rc=%Rrc\n", DEVICE_NAME, errno, rc));
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync return rc;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync }
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync /*
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * Mark the file handle close on exec.
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync */
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync if (fcntl(hDevice, F_SETFD, FD_CLOEXEC) != 0)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync {
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#ifdef IN_SUP_HARDENED_R3
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync int rc = VERR_INTERNAL_ERROR;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#else
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync int err = errno;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync int rc = RTErrConvertFromErrno(err);
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync LogRel(("suplibOSInit: setting FD_CLOEXEC failed, errno=%d (%Rrc)\n", err, rc));
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#endif
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync close(hDevice);
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync return rc;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync }
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync pThis->hDevice = hDevice;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync return VINF_SUCCESS;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync}
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync#ifndef IN_SUP_HARDENED_R3
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsyncint suplibOsTerm(PSUPLIBDATA pThis)
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync{
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync#ifdef VBOXFLT_DUMMYFILES
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync /*
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync * Close the dummy files first.
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync */
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync for (int i = 0; i < VBOXFLT_DUMMYFILES; i++)
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync {
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync if (pThis->hDummy[i] != -1)
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync {
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync close(pThis->hDummy[i]);
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync pThis->hDummy[i] = -1;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync }
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync }
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#endif
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync /*
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync * Check if we're initialized
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync */
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync if (pThis->hDevice != NIL_RTFILE)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync {
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync if (close(pThis->hDevice))
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync AssertFailed();
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync pThis->hDevice = NIL_RTFILE;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync }
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync return VINF_SUCCESS;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync}
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync
2a0a20dee7f474c26cc8f6f9d7aa12c345c2b73bvboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsyncint suplibOsInstall(void)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync{
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync return VERR_NOT_IMPLEMENTED;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync}
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsyncint suplibOsUninstall(void)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync{
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync return VERR_NOT_IMPLEMENTED;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync}
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsyncint suplibOsIOCtl(PSUPLIBDATA pThis, uintptr_t uFunction, void *pvReq, size_t cbReq)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync{
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync if (RT_LIKELY(ioctl(pThis->hDevice, uFunction, pvReq) >= 0))
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync return VINF_SUCCESS;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync return RTErrConvertFromErrno(errno);
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync}
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsyncint suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, uintptr_t idCpu)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync{
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync int rc = ioctl(pThis->hDevice, uFunction, idCpu);
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync if (rc == -1)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync rc = errno;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync return rc;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync}
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsyncint suplibOsPageAlloc(PSUPLIBDATA pThis, size_t cPages, void **ppvPages)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync{
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync NOREF(pThis);
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync *ppvPages = mmap(NULL, cPages * PAGE_SIZE, PROT_EXEC | PROT_READ | PROT_WRITE,
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync MAP_PRIVATE | MAP_ANON, -1, 0);
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync if (*ppvPages != (void *)-1)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync return VINF_SUCCESS;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync if (errno == EAGAIN)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync return VERR_NO_MEMORY;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync return RTErrConvertFromErrno(errno);
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync}
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsyncint suplibOsPageFree(PSUPLIBDATA pThis, void *pvPages, size_t cPages)
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync{
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync NOREF(pThis);
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync munmap(pvPages, cPages * PAGE_SIZE);
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync return VINF_SUCCESS;
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync}
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync#endif /* !IN_SUP_HARDENED_R3 */
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync
e52b0dfe3d9ead70e24f2ce4ed3faa6c79c00618vboxsync