mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 18:14:53 +00:00
hv: MSRs may need isolation between normal and secure world
- implement unified APIs to access guest_msrs[] under struct acrn_vcpu. - use these new APIs to read/write emulated TSC_DEADLINE MSR - switch world_msrs[] and guest_msrs[] during world switch for MSRs that need world isolation - remove the old guest_msrs[] array and it's index macros. Tracked-On: #1867 Signed-off-by: Zide Chen <zide.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -28,15 +28,6 @@
|
||||
(idx)++, vcpu = &(vm->hw.vcpu_array[(idx)])) \
|
||||
if (vcpu->state != VCPU_OFFLINE)
|
||||
|
||||
/* the index is matched with emulated msrs array*/
|
||||
#define IDX_TSC_DEADLINE 0U
|
||||
#define IDX_BIOS_UPDT_TRIG (IDX_TSC_DEADLINE + 1U)
|
||||
#define IDX_BIOS_SIGN_ID (IDX_BIOS_UPDT_TRIG + 1U)
|
||||
#define IDX_TSC (IDX_BIOS_SIGN_ID + 1U)
|
||||
#define IDX_PAT (IDX_TSC + 1U)
|
||||
#define IDX_APIC_BASE (IDX_PAT + 1U)
|
||||
#define IDX_MAX_MSR (IDX_APIC_BASE + 1U)
|
||||
|
||||
/*
|
||||
* VCPU related APIs
|
||||
*/
|
||||
@@ -139,6 +130,8 @@ int rdmsr_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int wrmsr_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
void init_msr_emulation(struct acrn_vcpu *vcpu);
|
||||
|
||||
uint32_t vmsr_get_guest_msr_index(uint32_t msr);
|
||||
|
||||
struct run_context;
|
||||
int vmx_vmrun(struct run_context *context, int ops, int ibrs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user