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] testing hypercall from windows - what's the most basic c

To: James Harper <james.harper@xxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] testing hypercall from windows - what's the most basic call I can make to test
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Mon, 24 Sep 2007 15:33:49 +0100
Delivery-date: Mon, 24 Sep 2007 07:36:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D0124982F@trantor>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acf+rpm9QXpClAmUQGKlPQ11YJlmywACVHy5
Thread-topic: [Xen-devel] testing hypercall from windows - what's the most basic call I can make to test
User-agent: Microsoft-Entourage/11.3.6.070618
Yes, all the below is correct. You do indeed just pass in a PFN and Xen will
copy data into it. In fact the nr_pfns part of the hypercall-page setup was
misguided I think. I'll guarantee that remains one forever more, so you can
just allocate a single page and get quite upset if you ever see CPUID return
more than one page when interrogated via leaf 0x40000002.

As for the simplest hypercall, that is xen_version.

 -- Keir

On 24/9/07 14:27, "James Harper" <james.harper@xxxxxxxxxxxxxxxx> wrote:

> . Get the PCI details (mmio space, io space, interrupt)
> . CPUID(0x40000000) to check for the XenVMMXenVMM signature
> . CPUID(0x40000001) to check the Xen version
> . CPUID(0x40000002) to get the number of pages for the hypercall memory
> space, and the msr to use
> . Allocate page-aligned, executable memory for the hypercall memory
> space
> . execute an WRMSR using the msr value given above and the pfn(*) of
> each page
> . make calls into the above space as required
> 
> (*) - It isn't clear to me how to do this under windows... anecdotal
> googling suggests I can get the physical address of the memory I
> allocated and shift it right by the PAGE_SHIFT value to get the pfn, but
> I thought there would be more to it than that...



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel