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>
This commit is contained in:
Li, Fei1 2019-05-10 07:33:50 +08:00 committed by wenlingz
parent 8afbdb7505
commit a68dadb74a

View File

@ -417,7 +417,9 @@ int32_t create_vm(uint16_t vm_id, struct acrn_vm_config *vm_config, struct acrn_
/* Create virtual uart;*/
vuart_init(vm, vm_config->vuart);
vrtc_init(vm);
if (is_rt_vm(vm) || !is_postlaunched_vm(vm)) {
vrtc_init(vm);
}
vpci_init(vm);