mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 17:27:53 +00:00
HV: Add both HW and SW checks for RDT support
There can be times when user unknowinlgy enables CONFIG_CAT_ENBALED SW flag, but the hardware might not support L3 or L2 CAT. In such case software can end up writing to the CAT MSRs which can cause undefined results. The patch fixes the issue by enabling CAT only when both HW as well software via the CONFIG_CAT_ENABLED supports CAT. The patch also address typo with "clos2prq_msr" function name. It should be "clos2pqr_msr" instead. PQR stands for platform qos register. Tracked-On: #3715 Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -19,12 +19,15 @@ struct cat_hw_info {
|
||||
|
||||
extern struct cat_hw_info cat_cap_info;
|
||||
extern const uint16_t hv_clos;
|
||||
extern uint16_t platform_clos_num;
|
||||
void setup_clos(uint16_t pcpu_id);
|
||||
|
||||
|
||||
#define CAT_RESID_L3 1U
|
||||
#define CAT_RESID_L2 2U
|
||||
|
||||
int32_t init_cat_cap_info(void);
|
||||
uint64_t clos2prq_msr(uint16_t clos);
|
||||
uint64_t clos2pqr_msr(uint16_t clos);
|
||||
bool is_platform_rdt_capable(void);
|
||||
|
||||
#endif /* RDT_H */
|
||||
|
Reference in New Issue
Block a user