mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-15 21:01:04 +00:00
This commit moves struct acrn_vm under common header vm.h, and move some x86-specific members of struct acrn_vm into arch_vm. This commit focuses on struct cleanup only. API cleanup will be in future patch series. The affected members are: e820_entry_num e820_entries wire_mode wbinvd_lock vlapic_mode_lock vcpuid_entry_nr vcpuid_level vcpuid_xlevel vcpuid_entries reset_control pm sworld_control sworld_snapshot intr_inject_delay_delta Moved to common vm.h: ept_lock -> rename to stg2pt_lock ept_pgtable -> rename to stg2_pgtable nworld_eptp -> rename to root_stg2ptp emul_mmio_lock nr_emul_mmio_regions emul_mmio emul_pio To avoid circular dependency, some in-header helpers are also moved into common vm.h. Tracked-On: #8830 Signed-off-by: Yifan Liu <yifan1.liu@intel.com> Reviewed-by: Fei Li <fei1.li@intel.com> Acked-by: Wang Yu1 <yu1.wang@intel.com>
25 lines
805 B
C
25 lines
805 B
C
/*
|
|
* Copyright (C) 2021-2022 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef VCAT_H_
|
|
#define VCAT_H_
|
|
|
|
#include <vm.h>
|
|
|
|
bool is_l2_vcat_configured(const struct acrn_vm *vm);
|
|
bool is_l3_vcat_configured(const struct acrn_vm *vm);
|
|
uint16_t vcat_get_vcbm_len(const struct acrn_vm *vm, int res);
|
|
void init_vcat_msrs(struct acrn_vcpu *vcpu);
|
|
uint16_t vcat_get_num_vclosids(const struct acrn_vm *vm);
|
|
uint64_t vcat_pcbm_to_vcbm(const struct acrn_vm *vm, uint64_t pcbm, int res);
|
|
int32_t read_vcbm(const struct acrn_vcpu *vcpu, uint32_t vmsr, uint64_t *rval);
|
|
int32_t write_vcbm(struct acrn_vcpu *vcpu, uint32_t vmsr, uint64_t val);
|
|
int32_t read_vclosid(const struct acrn_vcpu *vcpu, uint64_t *rval);
|
|
int32_t write_vclosid(struct acrn_vcpu *vcpu, uint64_t val);
|
|
|
|
#endif /* VCAT_H_ */
|
|
|