mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-02 13:44:00 +00:00
This patch is ready for next one,we will switch from pointer to embedded structures such as structure vcpu, some const qualifiers can be improper and raise compilation errors, this patch remove const qualifier for struct vm. Tracked-On: #861 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
54 lines
1.1 KiB
C
54 lines
1.1 KiB
C
/*
|
|
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
/************************************************************************
|
|
*
|
|
* FILE NAME
|
|
*
|
|
* hypervisor.h
|
|
*
|
|
* DESCRIPTION
|
|
*
|
|
* This file includes hypervisor used header files.
|
|
* It should be included in all the source files.
|
|
*
|
|
*
|
|
************************************************************************/
|
|
#ifndef HYPERVISOR_H
|
|
#define HYPERVISOR_H
|
|
|
|
/* Include config header file containing config options */
|
|
#include <types.h>
|
|
#include <errno.h>
|
|
#include <rtl.h>
|
|
#include <spinlock.h>
|
|
#include <mem_mgt.h>
|
|
#include <util.h>
|
|
#include <list.h>
|
|
#include <atomic.h>
|
|
#include <bits.h>
|
|
#include <sprintf.h>
|
|
#include "acrn_common.h"
|
|
#include <acrn_hv_defs.h>
|
|
#include <hv_arch.h>
|
|
#include <hv_debug.h>
|
|
|
|
#ifndef ASSEMBLER
|
|
/* gpa --> hpa -->hva */
|
|
static inline void *gpa2hva(struct vm *vm, uint64_t x)
|
|
{
|
|
return hpa2hva(gpa2hpa(vm, x));
|
|
}
|
|
|
|
static inline uint64_t hva2gpa(struct vm *vm, void *x)
|
|
{
|
|
return hpa2gpa(vm, hva2hpa(x));
|
|
}
|
|
|
|
#endif /* !ASSEMBLER */
|
|
|
|
#endif /* HYPERVISOR_H */
|