hv: Add vrtc emulation support for ACRN partition mode

This patch adds code to support read-only RTC support for guests
run by partition mode ACRN. It supports RW for CMOS address port 0x70
and RO for CMOS data port 0x71. Reads to CMOS RAM offsets are fetched
by reading CMOS h/w directly and writes to CMOS offsets are discarded.

Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
This commit is contained in:
Sainath Grandhi
2018-08-14 22:21:11 -07:00
committed by lijinxia
parent f63c7a7355
commit 022ef92b62
4 changed files with 91 additions and 1 deletions

View File

@@ -166,6 +166,7 @@ struct vm {
#ifdef CONFIG_PARTITION_MODE
struct vm_description *vm_desc;
struct vpci vpci;
uint8_t vrtc_offset;
#endif
};
@@ -275,5 +276,7 @@ struct pcpu_vm_desc_mapping {
bool is_bsp;
};
extern const struct pcpu_vm_desc_mapping pcpu_vm_desc_map[];
void vrtc_init(struct vm *vm);
#endif
#endif /* VM_H_ */