WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] HVM hypercalls

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] HVM hypercalls
From: Ruslan Nikolaev <nruslan_devel@xxxxxxxxx>
Date: Thu, 29 Jul 2010 11:55:41 -0700 (PDT)
Delivery-date: Thu, 29 Jul 2010 11:56:33 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1280429741; bh=2I9WNZf8ekjS2dqDKvRrPLakuslvFzxxGaIi2FhVfPQ=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ZQOQ2T38lwziWt+BKPE3o39SJm9qlm1Gbfz1vhxRyL5bqMtVCVWECzKWK6XDJscQ6WvMIQT03UkNJZQ2OiVSobgmV+dBsQCCKNpu0PJT+FkNClVky1tGh+1kxPnETyRLTZPlGNiCA6vtVGwNgd7dBXxjtP8FrtZTLsqFUZ5FCfg=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=xOyUNZOUU5Z9QiNtAf2BoJG7lq0sFBPTy/744b4FKLQB9LFbm7KJbybx+7RgjJAWGXVjdNDEW+mNUGIcuht/gAH8mJXHkpBLn9NhkhmWZDKxQyQnFXoQdUzmmyCZZ58DYw6hUpSWrLJaUWVlAECC7AMbCMhZBDfAPQZcw2W/Yms=;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C512E15.60909@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>