Kumar, Venkat
2008-Aug-20 06:03 UTC
[Xen-devel] Grant Table Hyper Calls For Sharing Memory
I was following an email chain in the xen mailing list on HVM hypercalls on grant tables and the email chain link is below http://lists.xensource.com/archives/html/xen-devel/2007-03/msg00688.html This link says that we need not required hypercalls to share memory b/w HVM''s. But as far as my understanding of sharing memory is concerned, I think the memory is shared using grant table mechanism and we would need Hypercall support related to grant tables to make this possible. Correct me if I am wrong. Or is there any other way of sharing memory or Inter domain communication? Thx, Venkat ===============================Venkata Kumar Duvvuru, LSI Engenio, Adv. Development, Bangalore. Mob: +91-9880318542 Off : +91-80-41978700 ( Extn : 3544 ) =============================== _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel Stodden
2008-Aug-20 06:37 UTC
Re: [Xen-devel] Grant Table Hyper Calls For Sharing Memory
Hope I''m not mistaken, but I believe this discussion only revolves around the fact that you don''t need hypercalls to *share* pages. The gnttab hypercall interface is only needed to *map* shared pages, not to let other domains access a hvm''s memory. Sharing a page only requires the owner to set appropriate permissions in her own grant table. That''s just a bit of store and cmpxchg. No hypercalling involved. Cheers, Daniel On Wed, 2008-08-20 at 14:03 +0800, Kumar, Venkat wrote:> I was following an email chain in the xen mailing list on HVM > hypercalls on grant tables and the email chain link is below > > http://lists.xensource.com/archives/html/xen-devel/2007-03/msg00688.html > > > > This link says that we need not required hypercalls to share memory > b/w HVM’s. > > > > But as far as my understanding of sharing memory is concerned, I think > the memory is shared using grant table mechanism and we would need > Hypercall support related to grant tables to make this possible. > > > > Correct me if I am wrong. > > > > Or is there any other way of sharing memory or Inter domain > communication? > > > > Thx, > > Venkat > > ===============================> > Venkata Kumar Duvvuru, > > LSI Engenio, > > Adv. Development, > > Bangalore. > > Mob: +91-9880318542 > > Off : +91-80-41978700 ( Extn : 3544 ) > > ===============================> > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel-- Daniel Stodden LRR - Lehrstuhl für Rechnertechnik und Rechnerorganisation Institut für Informatik der TU München D-85748 Garching http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kumar, Venkat
2008-Aug-20 09:24 UTC
RE: [Xen-devel] Grant Table Hyper Calls For Sharing Memory
I think that sharing page includes both offering the page and mapping the page. How can a foreign domain use the shared page without mapping the page from the obtained grant reference number? And for mapping a page you have to have a hypercall defined. Thx, Venkat -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Daniel Stodden Sent: Wednesday, August 20, 2008 12:08 PM To: Xen Developers Subject: Re: [Xen-devel] Grant Table Hyper Calls For Sharing Memory Hope I''m not mistaken, but I believe this discussion only revolves around the fact that you don''t need hypercalls to *share* pages. The gnttab hypercall interface is only needed to *map* shared pages, not to let other domains access a hvm''s memory. Sharing a page only requires the owner to set appropriate permissions in her own grant table. That''s just a bit of store and cmpxchg. No hypercalling involved. Cheers, Daniel On Wed, 2008-08-20 at 14:03 +0800, Kumar, Venkat wrote:> I was following an email chain in the xen mailing list on HVM > hypercalls on grant tables and the email chain link is below > > http://lists.xensource.com/archives/html/xen-devel/2007-03/msg00688.html > > > > This link says that we need not required hypercalls to share memory > b/w HVM''s. > > > > But as far as my understanding of sharing memory is concerned, I think > the memory is shared using grant table mechanism and we would need > Hypercall support related to grant tables to make this possible. > > > > Correct me if I am wrong. > > > > Or is there any other way of sharing memory or Inter domain > communication? > > > > Thx, > > Venkat > > ===============================> > Venkata Kumar Duvvuru, > > LSI Engenio, > > Adv. Development, > > Bangalore. > > Mob: +91-9880318542 > > Off : +91-80-41978700 ( Extn : 3544 ) > > ===============================> > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel-- Daniel Stodden LRR - Lehrstuhl für Rechnertechnik und Rechnerorganisation Institut für Informatik der TU München D-85748 Garching http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel Stodden
2008-Aug-20 09:38 UTC
RE: [Xen-devel] Grant Table Hyper Calls For Sharing Memory
On Wed, 2008-08-20 at 16:17 +0800, Kumar, Venkat wrote:> First of all, we require a hypercall to setup domain''s grant table, > HYPERVISOR_grant_table_op(GNTTABOP_setup_table, &setup, 1); > > As you said that sharing a page (to be more precise granting foreign access to a page I think) will be done by setting permissions in the grant table''s grant reference structure based on the grant reference number. > But what is the use of just granting access unless there is a way to map that page from a foreign domain?A PV domain will. Actually one may argue that this is a predominant usage pattern.> My assumption on sharing a page includes offering a page and mapping the page. > > Correct me if I am wrong.Sorry, I don''t know much enough the hvm core. Maybe someone else finds the comment. But I''d guess there''s probably more elegant (from a pure HVM perspective) ways to plug this into the machine. E.g. PCI memory. If that''s not how it presently works, maybe someone should do it.. ;) Daniel -- Daniel Stodden LRR - Lehrstuhl für Rechnertechnik und Rechnerorganisation Institut für Informatik der TU München D-85748 Garching http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel