mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 07:35:31 +00:00
hv: support reference time enlightenment
Two time related synthetic MSRs are implemented in this patch. Both of them are partition wide MSR. - HV_X64_MSR_TIME_REF_COUNT is read only and it is used to return the partition's reference counter value in 100ns units. - HV_X64_MSR_REFERENCE_TSC is used to set/get the reference TSC page, a sequence number, an offset and a multiplier are defined in this page by hypervisor and guest OS can use them to calculate the normalized reference time since partition creation, in 100ns units. Tracked-On: #3831 Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -401,6 +401,8 @@ int32_t rdmsr_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
case HV_X64_MSR_GUEST_OS_ID:
|
||||
case HV_X64_MSR_HYPERCALL:
|
||||
case HV_X64_MSR_VP_INDEX:
|
||||
case HV_X64_MSR_REFERENCE_TSC:
|
||||
case HV_X64_MSR_TIME_REF_COUNT:
|
||||
{
|
||||
err = hyperv_rdmsr(vcpu, msr, &v);
|
||||
break;
|
||||
@@ -689,6 +691,8 @@ int32_t wrmsr_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
case HV_X64_MSR_GUEST_OS_ID:
|
||||
case HV_X64_MSR_HYPERCALL:
|
||||
case HV_X64_MSR_VP_INDEX:
|
||||
case HV_X64_MSR_REFERENCE_TSC:
|
||||
case HV_X64_MSR_TIME_REF_COUNT:
|
||||
{
|
||||
err = hyperv_wrmsr(vcpu, msr, v);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user