[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Paravirt framebuffer frontend kernel support [1/5]



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.