acrn-hypervisor/devicemodel/hw/platform
Wu Zhou 262a48f346 dm: vm_event: add support for RTC change event
When a guest OS performs an RTC change action, we wish this event be
captured by developers, and then they can decide what to do with it.
(e.g., whether to change physical RTC)

There are some facts that makes RTC change event a bit complicated:
- There are 7 RTC date/time regs (year, month…). They can only be
  updated one by one.
- RTC time is not reliable before date/time update is finished.
- Guests can update RTC date/time regs in any order.
- Guests may update RTC date/time regs during either RTC halted or not
  halted.

A single date/time update event is not reliable. We have to wait for
the guest to finish the update process. So the DM's event handler
sets up a timer, and wait for some time (1 second). If no more change
happens befor the timer expires, we can conclude that the RTC
change has been done. Then the rtc change event is emitted.

This logic of event handler can be used to process HV vrtc time change
event too.

Tracked-On: #8547
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>
2024-02-01 17:01:31 +08:00
..
acpi dm: add _CPC to guest ACPI pm tables 2023-06-09 10:06:42 +08:00
rpmb Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
tpm dm: fix the secure coding style violations 2022-08-02 18:01:24 +08:00
vssram Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
atkbdc.c dm:use acrn-dm logger function instread of printf 2019-11-14 15:34:04 +08:00
cmos_io.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
debugexit.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
hpet.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
ioapic.c dm: Remove header vmm.h 2021-07-15 11:53:54 +08:00
ioc.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
ioc_cbc.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
pit.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
ps2kbd.c dm:use acrn-dm logger function instread of fprintf 2019-11-14 15:34:04 +08:00
ps2mouse.c dm:use acrn-dm logger function instread of fprintf 2019-11-14 15:34:04 +08:00
pty_vuart.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
rtc.c dm: vm_event: add support for RTC change event 2024-02-01 17:01:31 +08:00
usb_mouse.c DM USB: dynamically allocate block count for struct usb_xfer 2019-09-26 11:29:22 +08:00
usb_pmapper.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00