mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-18 19:57:31 +00:00
In platforms that support CAT, when it is enabled by ACRN, i.e. IA32_resourceType_MASK_n registers are programmed with customized values, it has impacts to the whole system. The per guest flag GUEST_FLAG_CLOS_REQUIRED suggests that CAT may be enabled in some guests, but not in others who don't have this flag, which is conceptually incorrect. This patch removes GUEST_FLAG_CLOS_REQUIRED, and adds a new Kconfig entry CAT_ENABLED for CAT enabling. When it's enabled, platform_clos_array[] defines a set of system-wide Class of Service (COS, or CLOS), and the per guest vm_configs[].clos associates the guest with particular CLOS. Tracked-On: #2462 Signed-off-by: Zide Chen <zide.chen@intel.com>
31 lines
739 B
C
31 lines
739 B
C
/*
|
|
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef CAT_H
|
|
#define CAT_H
|
|
|
|
/* The intel Resource Director Tech(RDT) based Cache Allocation Tech support */
|
|
struct cat_hw_info {
|
|
bool enabled; /* If L2/L3 CAT enabled */
|
|
uint32_t bitmask; /* Used by other entities */
|
|
uint16_t cbm_len; /* Length of Cache mask in bits */
|
|
uint16_t clos_max; /* Maximum CLOS supported, the number of cache masks */
|
|
|
|
uint32_t res_id;
|
|
};
|
|
|
|
extern struct cat_hw_info cat_cap_info;
|
|
extern const uint16_t hv_clos;
|
|
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);
|
|
|
|
#endif /* CAT_H */
|