From: Dietmar Hahn Subject: Re: runstate_info on hvm domain Date: Thu, 13 Nov 2008 15:00:56 +0100 Message-ID: <200811131500.56587.dietmar.hahn@fujitsu-siemens.com> References: <200811111429.29413.dietmar.hahn@fujitsu-siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200811111429.29413.dietmar.hahn@fujitsu-siemens.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Am Dienstag, 11. November 2008 schrieb Dietmar Hahn: > Hi list, > > I have running a hvm domU with the paravirtualized interface to xen. > Now I'm looking for an interface to get some informations from the > scheduler when a vcpu of my domain is running on a physical cpu and how > long. > > I searched through the sources and found VCPUOP_get_runstate_info and > VCPUOP_register_runstate_memory_area, but these hypercalls are only > possible on pv domains. > Are there any similar possibilities for hvm domains? > Thanks in advance for any hints! > To have correct cpu time accounting in our BS2000 hybrid hvm domU we would need this feature! I looked a little bit deeper in the xen source and found that it seems possible to use the mentioned features in a hvm domain too. I added the hypercall HYPERCALL(vcpu_op) to the hvm_hypercall64_table[] and hvm_hypercall32_table[] and now I could use the VCPU_OP function VCPUOP_get_runstate_info without any problems in my hvm domain, the hypervisor updated my runstate_info after registering with VCPUOP_register_runstate_memory_area. As it seems from the source there are no side effects for this 2 functions. The memory containing the runstate_info is always in the page table, so copy_to_guest() should not fail. Now my question: Is there a way to get such a feature into the hypervisor, should I send a patch, only releasing these both functions? Thanks. Dietmar.