2013-08-21 11:37:21 +02:00
|
|
|
/*
|
|
|
|
* \brief Common VirtualBox SUPLib supplements
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2013-08-20
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 Genode Labs GmbH
|
|
|
|
*
|
|
|
|
* This file is distributed under the terms of the GNU General Public License
|
|
|
|
* version 2.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SUP_H_
|
|
|
|
#define _SUP_H_
|
|
|
|
|
|
|
|
/* Genode includes */
|
2014-05-23 09:26:57 +02:00
|
|
|
#include <cpu_session/cpu_session.h>
|
2013-08-21 11:37:21 +02:00
|
|
|
|
|
|
|
/* VirtualBox includes */
|
|
|
|
#include <VBox/vmm/vm.h>
|
|
|
|
#include <VBox/vmm/gvmm.h>
|
2016-05-04 18:40:30 +02:00
|
|
|
#include <VBox/com/ptr.h>
|
2013-08-21 11:37:21 +02:00
|
|
|
#include <iprt/param.h>
|
|
|
|
|
2016-05-04 18:40:30 +02:00
|
|
|
#include "MachineImpl.h"
|
|
|
|
|
2014-07-16 21:43:41 +02:00
|
|
|
/**
|
|
|
|
* Returns true if a vCPU could be started. If false we run without
|
|
|
|
* hardware acceleration support.
|
|
|
|
*/
|
|
|
|
bool create_emt_vcpu(pthread_t * pthread, size_t stack,
|
|
|
|
const pthread_attr_t *attr,
|
|
|
|
void *(*start_routine)(void *), void *arg,
|
|
|
|
Genode::Cpu_session * cpu_session,
|
2015-07-24 18:38:34 +02:00
|
|
|
Genode::Affinity::Location location,
|
2016-09-23 10:10:01 +02:00
|
|
|
unsigned int cpu_id,
|
|
|
|
const char * name);
|
2014-07-16 21:43:41 +02:00
|
|
|
|
|
|
|
|
2013-08-21 11:37:21 +02:00
|
|
|
uint64_t genode_cpu_hz();
|
2015-09-25 14:54:34 +02:00
|
|
|
void genode_update_tsc(void (*update_func)(void), unsigned long update_us);
|
2013-08-21 11:37:21 +02:00
|
|
|
|
2014-05-23 09:26:57 +02:00
|
|
|
Genode::Cpu_session * get_vcpu_cpu_session();
|
|
|
|
|
2015-07-24 18:38:34 +02:00
|
|
|
void genode_VMMR0_DO_GVMM_CREATE_VM(PSUPVMMR0REQHDR pReqHdr);
|
|
|
|
void genode_VMMR0_DO_GVMM_REGISTER_VMCPU(PVMR0 pVMR0, VMCPUID idCpu);
|
|
|
|
|
2016-05-04 18:40:30 +02:00
|
|
|
HRESULT genode_setup_machine(ComObjPtr<Machine> machine);
|
|
|
|
|
2016-05-10 22:56:40 +02:00
|
|
|
HRESULT genode_check_memory_config(ComObjPtr<Machine> machine);
|
|
|
|
|
2013-08-21 11:37:21 +02:00
|
|
|
#endif /* _SUP_H_ */
|