mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 07:35:31 +00:00
hv: code clean up regarding to guest_msrs
Change guest_msrs in vcpu data structure from pointer to array, which could avoid the dynamic memory allocation. v1 -> v2: * Remove the unnecessary initialization for guest_msrs[] since vcpu is allocated by calloc. Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -240,7 +240,7 @@ struct vcpu {
|
||||
* code.
|
||||
*/
|
||||
uint64_t msr_tsc_aux_guest;
|
||||
uint64_t *guest_msrs;
|
||||
uint64_t guest_msrs[IDX_MAX_MSR];
|
||||
#ifdef CONFIG_MTRR_ENABLED
|
||||
struct mtrr_state mtrr;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user