hv: vCAT: initialize vCAT MSRs during vmcs init

Initialize vCBM MSRs

Initialize vCLOSID MSR

Add some vCAT functions:
 Retrieve max_vcbm and max_pcbm
 Check if vCAT is configured or not for the VM
 Map vclosid to pclosid
 write_vclosid: vCLOSID MSR write handler
 write_vcbm: vCBM MSR write handler

Tracked-On: #5917
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
This commit is contained in:
dongshen
2021-08-19 11:22:40 -07:00
committed by wenlingz
parent 75a4dde148
commit 77ae989379
8 changed files with 307 additions and 2 deletions

View File

@@ -0,0 +1,15 @@
/*
* 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>
void init_vcat_msrs(struct acrn_vcpu *vcpu);
#endif /* VCAT_H_ */

View File

@@ -256,6 +256,7 @@ void vrtc_init(struct acrn_vm *vm);
bool is_lapic_pt_configured(const struct acrn_vm *vm);
bool is_rt_vm(const struct acrn_vm *vm);
bool is_nvmx_configured(const struct acrn_vm *vm);
bool is_vcat_configured(const struct acrn_vm *vm);
bool is_pi_capable(const struct acrn_vm *vm);
bool has_rt_vm(void);
struct acrn_vm *get_highest_severity_vm(bool runtime);

View File

@@ -47,5 +47,6 @@ void init_rdt_info(void);
void setup_clos(uint16_t pcpu_id);
uint64_t clos2pqr_msr(uint16_t clos);
bool is_platform_rdt_capable(void);
const struct rdt_info *get_rdt_res_cap_info(int res);
#endif /* RDT_H */