|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] HVM hypercalls
Thank you very much! I'll try this. BTW is it required to do this for every
module with HVM hypercalls or there is some shared initialization code in HVM
guest (Linux) similar to one used in paravirtualized guests?
If it's supposed to be in a module, is there any good example I can look at?
AFAIK hypercall_page is being initialized on Xen side with appropriate
vmcall/vmmcall code. Is this CPUID mechanism a standard way to obtain
hypercall_page reference on HVM domain?
Thank you!
Ruslan.
--- On Thu, 7/29/10, Juergen Gross <juergen.gross@xxxxxxxxxxxxxx> wrote:
> From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
> Subject: Re: [Xen-devel] HVM hypercalls
> To: "Ruslan Nikolaev" <nruslan_devel@xxxxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
> Date: Thursday, July 29, 2010, 11:30 AM
> 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
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|