From: Keir Fraser Subject: Re: Native hypercall basics using int 82 Date: Tue, 16 Dec 2008 08:47:39 +0000 Message-ID: References: <6a3ccf200812160039g55343adn750be651e432d4a5@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <6a3ccf200812160039g55343adn750be651e432d4a5@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: hnrkssn hnrkssn , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 16/12/2008 08:39, "hnrkssn hnrkssn" wrote: > I'm trying to detect if I'm running as a guest in XEN hypervisor using a > simple hypercall like __HYPERVISOR_xen_version with the XENVER_extraversion > option. > I cannot use any of the API functions for this so I'm trying to setup the > required registers and call int 82 myself. > This is what I do and unfortunately, it generates an exception 0xd when > executing INT 82. > > Reading the source, I think I've figured out that I should put my arguments in > a hypercall struct shown below. I might be wrong then. See tools/misc/xen-detect.c for a nice approach that even works from user space. -- Keir