2013-08-21 11:37:21 +02:00
|
|
|
/*
|
|
|
|
* \brief Common VirtualBox SUPLib supplements
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2013-08-20
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 13:23:52 +01:00
|
|
|
* Copyright (C) 2013-2017 Genode Labs GmbH
|
2013-08-21 11:37:21 +02:00
|
|
|
*
|
|
|
|
* This file is distributed under the terms of the GNU General Public License
|
|
|
|
* version 2.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SUP_H_
|
|
|
|
#define _SUP_H_
|
|
|
|
|
|
|
|
/* Genode includes */
|
2016-11-23 17:07:49 +01:00
|
|
|
#include <base/component.h>
|
2020-05-05 14:27:29 +02:00
|
|
|
#include <cpu_session/connection.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"
|
2016-10-04 11:07:59 +02:00
|
|
|
HRESULT genode_setup_machine(ComObjPtr<Machine> machine);
|
|
|
|
|
2019-03-13 13:39:04 +01:00
|
|
|
HRESULT genode_check_memory_config(ComObjPtr<Machine> machine, size_t);
|
2016-05-04 18:40:30 +02:00
|
|
|
|
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,
|
|
|
|
void *(*start_routine)(void *), void *arg,
|
2020-05-05 14:27:29 +02:00
|
|
|
Genode::Cpu_connection *,
|
2015-07-24 18:38:34 +02:00
|
|
|
Genode::Affinity::Location location,
|
2016-09-23 10:10:01 +02:00
|
|
|
unsigned int cpu_id,
|
2019-05-06 10:34:47 +02:00
|
|
|
const char * name, long prio);
|
2014-07-16 21:43:41 +02:00
|
|
|
|
|
|
|
|
2013-08-21 11:37:21 +02:00
|
|
|
uint64_t genode_cpu_hz();
|
2019-04-09 15:46:36 +02:00
|
|
|
void genode_update_tsc(void (*update_func)(void), Genode::uint64_t update_us);
|
2013-08-21 11:37:21 +02:00
|
|
|
|
2020-05-05 14:27:29 +02:00
|
|
|
Genode::Cpu_connection * get_vcpu_cpu_connection();
|
2014-05-23 09:26:57 +02:00
|
|
|
|
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);
|
|
|
|
|
2013-08-21 11:37:21 +02:00
|
|
|
#endif /* _SUP_H_ */
|