mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-10-09 20:35:44 +00:00
VRTC for hv used to ignore writes to vRTC register. This patch add time modification to vRTC. Add base RTC time and TSC offset to get the current time. Convert current time to vRTC register values (`struct rtcdev`). Then modify a register, and calculate a new time. Get RTC offset by substrcting new time from current time. Thereafter, add RTC offset also when get current time. Then user can get the modified time. Tracked-On: #7440 Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>