2018-03-07 20:57:14 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
|
|
|
*
|
2018-05-26 01:49:13 +08:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
2018-03-07 20:57:14 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
*
|
|
|
|
* FILE NAME
|
|
|
|
*
|
|
|
|
* hypervisor.h
|
|
|
|
*
|
|
|
|
* DESCRIPTION
|
|
|
|
*
|
2018-05-22 23:24:07 +08:00
|
|
|
* This file includes hypervisor used header files.
|
2018-03-07 20:57:14 +08:00
|
|
|
* It should be included in all the source files.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef HYPERVISOR_H
|
|
|
|
#define HYPERVISOR_H
|
|
|
|
|
|
|
|
/* Include config header file containing config options */
|
2018-05-22 08:30:50 +08:00
|
|
|
#include <types.h>
|
|
|
|
#include "acrn_common.h"
|
|
|
|
#include <acrn_hv_defs.h>
|
|
|
|
#include <hv_lib.h>
|
|
|
|
#include <hv_arch.h>
|
|
|
|
#include <hv_debug.h>
|
2018-03-07 20:57:14 +08:00
|
|
|
|
|
|
|
#ifndef ASSEMBLER
|
|
|
|
/* hpa <--> hva, now it is 1:1 mapping */
|
|
|
|
#define HPA2HVA(x) ((void *)(x))
|
|
|
|
#define HVA2HPA(x) ((uint64_t)(x))
|
|
|
|
/* gpa --> hpa -->hva */
|
|
|
|
#define GPA2HVA(vm, x) HPA2HVA(gpa2hpa(vm, x))
|
2018-06-20 16:42:56 +08:00
|
|
|
#define HVA2GPA(vm, x) hpa2gpa(vm, HVA2HPA(x))
|
2018-03-07 20:57:14 +08:00
|
|
|
#endif /* !ASSEMBLER */
|
|
|
|
|
|
|
|
#endif /* HYPERVISOR_H */
|