mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 07:35:31 +00:00
hv:move some files to guest folder
move the following files to guest folder:
renamed: arch/x86/assign.c -> arch/x86/guest/assign.c
renamed: arch/x86/ept.c -> arch/x86/guest/ept.c
renamed: arch/x86/io_emul.c -> arch/x86/guest/io_emul.c
renamed: arch/x86/trusty.c -> arch/x86/guest/trusty.c
renamed: arch/x86/virq.c -> arch/x86/guest/virq.c
renamed: arch/x86/virtual_cr.c -> arch/x86/guest/virtual_cr.c
renamed: arch/x86/vmcs.c -> arch/x86/guest/vmcs.c
renamed: arch/x86/vmexit.c -> arch/x86/guest/vmexit.c
renamed: arch/x86/vmx_asm.S -> arch/x86/guest/vmx_asm.S
renamed: include/arch/x86/assign.h ->
include/arch/x86/guest/assign.h
renamed: include/arch/x86/io_emul.h ->
include/arch/x86/guest/io_emul.h
renamed: include/arch/x86/trusty.h ->
include/arch/x86/guest/trusty.h
renamed: include/arch/x86/virtual_cr.h ->
include/arch/x86/guest/virtual_cr.h
renamed: include/arch/x86/vmcs.h -> include/arch/x86/guest/vmcs.h
renamed: include/arch/x86/vmexit.h ->
include/arch/x86/guest/vmexit.h
After these files movement, all the files in arch/x86 are native
hardware related, and all the files in arch/x86/guest are
virtualiztion related.
Tracked-On: #1842
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
Eddie Dong
parent
e9bb4267a7
commit
2b2dbe43d7
95
hypervisor/include/arch/x86/guest/virtual_cr.h
Normal file
95
hypervisor/include/arch/x86/guest/virtual_cr.h
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef VCR_H
|
||||
#define VCR_H
|
||||
|
||||
/**
|
||||
* @file virtual_cr.h
|
||||
*
|
||||
* @brief public APIs for vCR operations
|
||||
*/
|
||||
|
||||
void init_cr0_cr4_host_mask(void);
|
||||
|
||||
/**
|
||||
* @brief vCR from vcpu
|
||||
*
|
||||
* @defgroup vCR ACRN
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief get vcpu CR0 value
|
||||
*
|
||||
* Get & cache target vCPU's CR0 in run_context.
|
||||
*
|
||||
* @param[in] vcpu pointer to vcpu data structure
|
||||
*
|
||||
* @return the value of CR0.
|
||||
*/
|
||||
uint64_t vcpu_get_cr0(struct acrn_vcpu *vcpu);
|
||||
|
||||
/**
|
||||
* @brief set vcpu CR0 value
|
||||
*
|
||||
* Update target vCPU's CR0 in run_context.
|
||||
*
|
||||
* @param[inout] vcpu pointer to vcpu data structure
|
||||
* @param[in] val the value set CR0
|
||||
*/
|
||||
void vcpu_set_cr0(struct acrn_vcpu *vcpu, uint64_t val);
|
||||
|
||||
/**
|
||||
* @brief get vcpu CR2 value
|
||||
*
|
||||
* Get & cache target vCPU's CR2 in run_context.
|
||||
*
|
||||
* @param[in] vcpu pointer to vcpu data structure
|
||||
*
|
||||
* @return the value of CR2.
|
||||
*/
|
||||
uint64_t vcpu_get_cr2(const struct acrn_vcpu *vcpu);
|
||||
|
||||
/**
|
||||
* @brief set vcpu CR2 value
|
||||
*
|
||||
* Update target vCPU's CR2 in run_context.
|
||||
*
|
||||
* @param[inout] vcpu pointer to vcpu data structure
|
||||
* @param[in] val the value set CR2
|
||||
*/
|
||||
void vcpu_set_cr2(struct acrn_vcpu *vcpu, uint64_t val);
|
||||
|
||||
/**
|
||||
* @brief get vcpu CR4 value
|
||||
*
|
||||
* Get & cache target vCPU's CR4 in run_context.
|
||||
*
|
||||
* @param[in] vcpu pointer to vcpu data structure
|
||||
*
|
||||
* @return the value of CR4.
|
||||
*/
|
||||
uint64_t vcpu_get_cr4(struct acrn_vcpu *vcpu);
|
||||
|
||||
/**
|
||||
* @brief set vcpu CR4 value
|
||||
*
|
||||
* Update target vCPU's CR4 in run_context.
|
||||
*
|
||||
* @param[inout] vcpu pointer to vcpu data structure
|
||||
* @param[in] val the value set CR4
|
||||
*/
|
||||
void vcpu_set_cr4(struct acrn_vcpu *vcpu, uint64_t val);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
/* End of vCR */
|
||||
|
||||
int32_t cr_access_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
|
||||
#endif /* VCR_H */
|
||||
Reference in New Issue
Block a user