acrn-hypervisor/devicemodel/hw
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
..
mmio dm: fix the secure coding style violations 2022-08-02 18:01:24 +08:00
pci dm: lpc: only emulate COM ports specified in command line 2024-01-22 10:58:00 +08:00
platform dm: vm_event: add support for RTC change event 2024-02-01 17:01:31 +08:00
block_if.c dm: blockif: Convert print output to acrn-dm logger 2020-09-10 09:33:25 +08:00
gc.c dm: virtio-gpu: VGA compability support 2022-03-28 15:26:20 +08:00
uart_core.c dm: lpc: support emulating UART COM3 and COM4 2024-01-22 10:58:00 +08:00
usb_core.c DM USB: modify disconnecting logic to support Windows 10 2019-09-26 11:29:22 +08:00
vdisplay_sdl.c dm: vdisplay_sdl: fix command line option parsing 2023-07-05 18:48:58 +08:00
vga.c dm: fix NULL pointer dereference risk in vdisplay 2023-07-05 18:48:58 +08:00