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

[Xen-users] Grant reference batch transmission

  • To: "xen-users@xxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxx>
  • From: Gareth Stockwell <Gareth.Stockwell@xxxxxxx>
  • Date: Tue, 10 Mar 2015 14:15:06 +0000
  • Accept-language: en-US, en-GB
  • Acceptlanguage: en-US, en-GB
  • Delivery-date: Tue, 10 Mar 2015 14:16:36 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>
  • Thread-index: AdBbPGzUtf5KzbP1SrW+nM55Ky8Nog==
  • Thread-topic: Grant reference batch transmission

What is the recommended way to transmit batches of grant references between Linux domains?


I need to share large regions of memory between domains.  I understand that the grant table API can be used to share memory, with one grant reference being created per page (frame) to be shared:


    gref = gnttab_grant_foreign_access(otherend_id, frame, readonly);




    err = gnttab_alloc_grant_references(num_grefs, &gref_head);

    gref = gnttab_claim_reference(&gref_head);

    err = gnttab_grant_foreign_access_ref(gref, otherend_id, frame, readonly);


In order to share a large number of pages, it is desirable to minimise both the number of hypercalls required in each domain, and the number of messages (e.g. xenstore writes) required to transmit grant reference(s) from the donor to the recipient.


I see that gnttab_grant_foreign_access just updates grant table fields in a page which is mapped into the donor, and does not require a hypercall.  In the recipient domain, multiple grant references can be mapped by gnttab_map_refs using a single GNTTABOP_map_grant_ref hypercall (assuming that the target memory is not paged out).


What is the recommended way for the donor to transmit a batch of grant references?  I assume that this requires the donor to pack references into an index page, grant foreign access to the index and transmit the index grant reference.  Does Linux provide any way to do this, or are xenbus drivers expected to implement their own batch transmission?


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782
Xen-users mailing list



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