mirror of
				https://github.com/projectacrn/acrn-hypervisor.git
				synced 2025-10-31 01:09:28 +00:00 
			
		
		
		
	Currently, the clos id of the cpu cores in vmx root mode is the same as non-root mode. For RTVM, if hypervisor share the same clos id with non-root mode, the cacheline may be polluted due to the hypervisor code execution when vmexit. The patch adds hv_clos in vm_configurations.c Hypervisor initializes clos setting according to hv_clos during physical cpu cores initialization. For RTVM, MSR auto load/store areas are used to switch different settings for VMX root/non-root mode for RTVM. Tracked-On: #2462 Signed-off-by: Binbin Wu <binbin.wu@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com>
		
			
				
	
	
		
			32 lines
		
	
	
		
			784 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			784 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 support;		/* If L2/L3 CAT supported */
 | |
| 	bool enabled;		/* If any VM setup CLOS */
 | |
| 	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 */
 |