Skip to content

Commit a68dadb

Browse files
lifeixwenlingz
authored andcommitted
hv: vm: minor fix about vRTC
For prelaunched VM, Service OS and postlaunched RT VM, we only need the vRTC provides backed-up date, so we could use the simple vRTC which implemented in hypervisor. For postlaunched VM (which is not a RT VM), we needs the device module to emulate the vRTC for it. Tracked-On: #1842 Signed-off-by: Li, Fei1 <fei1.li@intel.com> Reviewed-by: Yu Wang <yu1.wang@intel.com>
1 parent 8afbdb7 commit a68dadb

File tree

1 file changed

+3
-1
lines changed
  • hypervisor/arch/x86/guest

1 file changed

+3
-1
lines changed

hypervisor/arch/x86/guest/vm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,9 @@ int32_t create_vm(uint16_t vm_id, struct acrn_vm_config *vm_config, struct acrn_
417417
/* Create virtual uart;*/
418418
vuart_init(vm, vm_config->vuart);
419419

420-
vrtc_init(vm);
420+
if (is_rt_vm(vm) || !is_postlaunched_vm(vm)) {
421+
vrtc_init(vm);
422+
}
421423

422424
vpci_init(vm);
423425

0 commit comments

Comments
 (0)