Skip to contentSkip to conversation

runstate_info on hvm domain

DISCUSSION Dietmar Hahn 2 participants 4 messages Nov 11, 2008 – Nov 13, 2008

lore
Share & tools
lore
#0 lore raw

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!

Dietmar.

#1 lore raw

Am Dienstag, 11. November 2008 schrieb Dietmar Hahn:

Quoted 7 lines

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.

Quoted 6 lines

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.

#2 lore raw
Quoted 3 lines · Dietmar Hahn

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.

I've just done this for you as c/s 18777.

-- Keir

#3 lore raw

Am Donnerstag, 13. November 2008 schrieb Keir Fraser:

Quoted 8 lines · Dietmar Hahn
Quoted 3 lines

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.

I've just done this for you as c/s 18777.

-- Keir

Great, thanks!

Dietmar.