On Tue, 6 Nov 2018, Peng Fan wrote: > Hi Julien, > > > -----Original Message----- > > From: Xen-devel [mailto:xen-devel-bounces@lists.xenproject.org] On Behalf Of > > Peng Fan > > Sent: 2018年11月5日 10:11 > > To: Julien Grall ; xen-devel@lists.xenproject.org; > > Stefano Stabellini > > Subject: Re: [Xen-devel] Does XEN ARM support RTC in domu? > > > > Hi Julien, > > > > > >> > > > >>> > > > >>> Just have a question, does XEN ARM support RTC in domu? To support > > > >>> Android > > > >> in DomU, RTC is needed for alarm, but I did not find information > > > >> about RTC on xen for domu. So this need a new RTC paravirtualization > > driver? > > > Any suggestions? > > > >> > > > >> By RTC, do you mean Real-Time Clock? Something like PL031? Or do > > > >> you have something else in mind? > > > > > > > > Yes, Real Time Clock like PL031 in DomU. I do not have a good idea > > > > support RTC in ARM DomU, KVM and XEN x86 seems use emulated RTC in > > > > qemu. Thinking of paravirtual RTC, and dom0 control the expire time > > > > for > > > alarm. > > > > > > The PL031 is quite small (based on the QEMU version). So I think it > > > would be fine to provide an emulation in the hypervisor. > > > > Ok. Just like the hvm x86, implement emulate PL031 inside XEN. I'll give a try. > > Just a follow up question, emulating PL031 in xen, do you have idea how to inject virtual interrupt to domu? > The interrupt should be only cpu interface interrupt, I think. Have a loop at the existing virtual timer: xen/arch/arm/vtimer.c It should give you a decent idea.