mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-07 16:07:03 +00:00
Expose CAT feature to vCAT VM by reporting the number of cache ways/CLOSIDs via the 04H/10H cpuid instructions, so that the VM can take advantage of CAT to prioritize and partition cache resource for its own tasks. Add the vcat_pcbm_to_vcbm() function to map pcbm to vcbm Tracked-On: #5917 Signed-off-by: dongshen <dongsheng.x.zhang@intel.com> Acked-by: Eddie Dong <eddie.dong@Intel.com>
21 lines
549 B
C
21 lines
549 B
C
/*
|
|
* Copyright (C) 2021 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef VCAT_H_
|
|
#define VCAT_H_
|
|
|
|
#include <asm/guest/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);
|
|
|
|
#endif /* VCAT_H_ */
|
|
|