From: Tim Deegan Subject: Re: Hypervisor to dom0 communication Date: Thu, 15 Nov 2012 12:10:34 +0000 Message-ID: <20121115121034.GB75988@ocelot.phlegethon.org> References: <50A16639.2090209@gmail.com> <1352800791.7491.21.camel@zakaz.uk.xensource.com> <50A22044.6060608@gmail.com> <1352802973.7491.40.camel@zakaz.uk.xensource.com> <50A225CA.2080705@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <50A225CA.2080705@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Razvan Cojocaru Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org At 12:49 +0200 on 13 Nov (1352810986), Razvan Cojocaru wrote: > >>OK, my immediate end-goal is real-time logging of hypervisor events via > >>a dom0 userspace application. These events are always about a currently > >>running virtual machine, and said virtual machine is paused at the time. > >>The userspace tool should be immediately notified, so no polling. > > > >This is very like the ioreq model, where the domain (or maybe just the > >vcpu, I'm not sure) is paused while qemu does its thing. > > > >What sort of events are we talking about here? > > A list of interesting registers that changed, that a page fault occured, > things like that, occasionally containing some small string messages > with extra information. Should be around 64 bytes or so. > > >The right thing to do here is for the userspace tool to communicate with > >the toolstack (by whatever means) rather the hypervisor in order to > >control the domains. > > That's what I was thinking too. > > >You might also find some inspiration for this sort of model in the > >xenpaging and memshare code. Yes, the mem-event api that they use is pretty well suited to this -- it sends a series of events to userspace, wih the option of pausing the guest VCPU until userspace acknowledges the event. ISRT the mem-access API already allows for certain kinds of register info (CR3 writes) to be sent on that channel. Cheers, Tim.