[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] HVM hypercalls
On 07/28/2010 09:22 PM, Ruslan Nikolaev wrote:
Hi I need to use hypercalls from HVM domain (e.g. HYPERVISOR_add_to_physmap). However, it does not work when I am trying to invoke it from HVM Linux guest. Basically, I don't see that anything happens on hypervisor's side. I also grep'ed the guest code for 'vmmcall'/'vmcall' and did not find anything. Is it possible to do it at all? Is it possible to make hypercalls from HVM domains or are they simply used for tools responsible to load HVM domain? Also, are they allowed (if allowed at all) from stubdom, ioemu, or both configurations? I am using latest Xen version (xen-4.0.1-rc). I also tried both official Linux distribution as an HVM domain and the version from Xen repositary. The computer has Nehalem processor with VMX.
This should work. We are using hypercalls from HVM domains without any problem on xen 3.3 and 4.0, one of them being HYPERVISOR_add_to_physmap. There must be something you are doing wrong. The following steps are required: - use the cpuid instruction to search for Xen signature. You should begin with index 0x40000000 and look for the text "XenVMMXenVMM" in the returned registers ebx, ecx and edx. Increment the index by 0x100 up to 0x40001000 if necessary. - get the xen msr register number via cpuid with index 0x40000x002 (x from step 1). The msr register number will be in register ebx. - write the physical address of a 4k page to the obtained msr register via wrmsr. This page will be used by the hypervisor to write the appropriate code for the hypercalls to. - each entry in that page occupies 32 bytes. You can do a specific hypercall by calling the function at the specific entry with the hypercall number as index Juergen -- Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: juergen.gross@xxxxxxxxxxxxxx Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
Lists.xenproject.org is hosted with RackSpace, monitoring our