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] [PATCH] Paravirt framebuffer frontend kernel support [1/

To: Steven Smith <sos22@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Paravirt framebuffer frontend kernel support [1/5]
From: Markus Armbruster <armbru@xxxxxxxxxx>
Date: Thu, 02 Nov 2006 08:53:38 +0100
Cc: aliguori <aliguori@xxxxxxxxxxxxxxx>, Jeremy Katz <katzj@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, sos22@xxxxxxxxxxxxx
Delivery-date: Thu, 02 Nov 2006 13:32:44 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060910093801.GA1874@xxxxxxxxx> (Steven Smith's message of "Sun, 10 Sep 2006 10:38:01 +0100")
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>
References: <1157227080.11059.38.camel@xxxxxxxxxxxxxx> <20060904090045.GA4812@xxxxxxxxx> <87hczgrx07.fsf@xxxxxxxxxxxxxxxxx> <20060910093801.GA1874@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)
Steven Smith <sos22@xxxxxxxxx> writes:

[...]
>> As far as I can see, this is our only option right now.  I'm ignorant
>> of `shadow translate mode'; can somebody please educate me on how to
>> detect and translate shadow translate mode frontend mfns in the
>> backend?
> Shadow translate mode is a mode of the shadow page tables in which Xen
> does machine<->physical address translations on behalf of the guest.
> It's mostly used for HVM guests to give them the impression of a
> mostly-contiguous block of memory starting at machine address 0.
>
> If you just bung the guest-supplied machine frame numbers through
> xc_translate_gpfn_list you should be fine.  That does the translation
> if you're in shadow translate mode and does nothing if you're not.

Assuming you mean xc_domain_translate_gpfn_list().  I tried
translating fbdev_mfn right before use, as follows:

        ret = xc_domain_translate_gpfn_list(xenfb->xc, domid, 1,
                                            &fbdev_mfn, &fbdev_mfn);
        if (ret < 0)
                goto error;
        xenfb->fb_info = xc_map_foreign_range(xenfb->xc, domid, XC_PAGE_SIZE,
                                              PROT_READ | PROT_WRITE,
                                              fbdev_mfn);
        if (xenfb->fb_info == NULL)
                goto error;

However, xc_domain_translate_gpfn_list() always fails with EINVAL for
me.  If I read its code correctly, this can happen because op.nr_gpfns
is too large, or !shadow_mode_translate().  I suspect its the latter.
Should I call it only when in shadow translate mode?  How to check for
that?  Or am I doing something wrong?

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