acrn-hypervisor/devicemodel/core
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
..
cmd_monitor dm: vm_event: add vm_event support in cmd monitor 2024-02-01 17:01:31 +08:00
console.c DM: remove unused function console_ptr_event 2019-05-24 11:51:00 +08:00
hugetlb.c devicemodel: Fix spelling and grammar mistakes. 2023-09-08 08:01:13 +08:00
inout.c hv: dm: Use new I/O request data structures 2021-07-15 11:53:54 +08:00
iothread.c devicemodel: Fix spelling and grammar mistakes. 2023-09-08 08:01:13 +08:00
main.c dm: vm_event: init vm_event 2024-02-01 17:01:31 +08:00
mem.c hv: dm: Use new I/O request data structures 2021-07-15 11:53:54 +08:00
mevent.c devicemodel: Fix spelling and grammar mistakes. 2023-09-08 08:01:13 +08:00
monitor.c devicemodel: Fix spelling and grammar mistakes. 2023-10-23 08:57:53 +08:00
mptbl.c dm: fixed a bug where mptable failed to wake up CPU1# when adding acpi=off into User VM cmdline 2022-03-02 11:22:31 +08:00
pm.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
pm_vuart.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
post.c dm: refine 'assert' in inout.c and post.c 2019-06-20 08:55:44 +08:00
sbuf.c dm: vm_event: add sbuf code in dm 2024-02-01 17:01:31 +08:00
sw_load_bzimage.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
sw_load_common.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
sw_load_elf.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
sw_load_ovmf.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
sw_load_vsbl.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
timer.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
vm_event.c dm: vm_event: add support for RTC change event 2024-02-01 17:01:31 +08:00
vmmapi.c asyncio: refine the setup ioctl 2022-11-25 10:43:34 +08:00
vrpmb.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00