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

Re: [win-pv-devel] XcGnttabMapForeignPages function fails



Hey Rafal,

Yes i am opening driver handle twice.

Will give a try by opening driver handle only once.

Thanks a lot,
Gaurav

On Fri, Sep 23, 2016 at 5:43 PM, Rafał Wojdyła <omeg@xxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi Gaurav,

If I remember correctly xeniface tracks grants/maps using caller's file
object. I think the issue may be that you are using different driver
handles in your user mode calls. If that's the case, try opening the
driver handle only once and use that handle for all grant/map calls.

--
Rafał Wojdyła
Qubes Windows Tools developer
https://qubes-os.org/

On 2016-09-23 13:44, Gaurav Khuntale wrote:
> Hello Paul,
>
> Thanks for your help and sorry for delayed response. We solved the issue
> which was in our custom driver in domain 0.
>
> But now XcGnttabMapForeignPages() function is failing with error code
> STATUS_INVALID_PARAMETER if we call this function twice to map two
> different grant pages which are allocated in domain 0.
> The second call to XcGnttabMapForeignPages() always fails with the same
> error.
>
> From the xeniface driver logs, it seems that function is failing at
> FindGnttabIrp() api in IoctlGnttabPermitForeignAccess().
> Is there anything like, we can not map two different pages in the same
> process?
>
> Kindly help me to understand the reason behind above issue.
>
> Thanks,
> Gaurav
>
> On Fri, Sep 9, 2016 at 2:41 PM, Paul Durrant <Paul.Durrant@xxxxxxxxxx
> <mailto:Paul.Durrant@citrix.com>> wrote:
>
>     ‘xl debug-keys g’ should do what you want, I think.____
>
>     __ __
>
>       Paul____
>
>     __ __
>
>     *From:*Gaurav Khuntale [mailto:gauravkhuntale@gmail.com
>     <mailto:gauravkhuntale@gmail.com>]
>     *Sent:* 07 September 2016 15:58
>     *To:* Paul Durrant <Paul.Durrant@xxxxxxxxxx
>     <mailto:Paul.Durrant@citrix.com>>
>     *Cc:* win-pv-devel@lists.xenproject.org
>     <mailto:win-pv-devel@lists.xenproject.org>
>     *Subject:* Re: [win-pv-devel] XcGnttabMapForeignPages function fails____
>
>     __ __
>
>     Hello Paul,____
>
>     __ __
>
>     Thank you for your reply.____
>
>     __ __
>
>     Can you please tell me any way to check grant table of the domain?____
>
>     __ __
>
>     Thanks,____
>
>     Gaurav____
>
>     __ __
>
>     On Wed, Sep 7, 2016 at 4:19 PM, Paul Durrant
>     <Paul.Durrant@xxxxxxxxxx <mailto:Paul.Durrant@citrix.com>> wrote:____
>
>         Hi,____
>
>          ____
>
>           There should be no difference. If the page is present in the
>         grant table of the domain that you’re attempting to map it from
>         then you should be able to access it. The OS running in the
>         domain should have no bearing (unless its interaction with Xen
>         is buggy or limited in some way).____
>
>          ____
>
>           Paul____
>
>          ____
>
>         *From:*win-pv-devel
>         [mailto:win-pv-devel-bounces@lists.xenproject.org
>         <mailto:win-pv-devel-bounces@lists.xenproject.org>] *On Behalf
>         Of *Gaurav Khuntale
>         *Sent:* 06 September 2016 19:30
>         *To:* win-pv-devel@lists.xenproject.org
>         <mailto:win-pv-devel@lists.xenproject.org>
>         *Subject:* [win-pv-devel] XcGnttabMapForeignPages function fails____
>
>          ____
>
>         Hello Folks,____
>
>          ____
>
>         For learning purpose i am trying things with event-channel and
>         grant pages on Xen.____
>
>          ____
>
>         The problem currently i am facing is, XcGnttabMapForeignPages()
>         function fails to map grant pages which are shared from domain 0
>         with error code as 31(0x1f). To share pages from domain 0, i am
>         using xc_gntshr_share_pages() function.____
>
>          ____
>
>         When i tried to map grant pages into the windows guest domain
>         which are shared from other windows guest domain then same
>         function XcGnttabMapForeignPages() works perfectly.____
>
>          ____
>
>         Can anyone please help me to understand why i am observing such
>         a behavior? Does grant page sharing not supported across the
>         different operating system?____
>
>          ____
>
>         Thanks in advance.____
>
>     __ __
>
>
>
>
> _______________________________________________
> win-pv-devel mailing list
> win-pv-devel@lists.xenproject.org
> https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
>


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

 


Rackspace

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