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/
Home Products Support Community News


[Xen-devel] Question on struct grant table hypercall

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Question on struct grant table hypercall
From: Daniel Castro <evil.dani@xxxxxxxxx>
Date: Tue, 28 Jun 2011 09:38:51 +0900
Delivery-date: Mon, 27 Jun 2011 17:39:23 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=t25DLh0Z49DvGISTxxKiJVqehIOJFoeROu3muKZHRZ0=; b=crpze3Uw3NvA7bjRHC4U2uvfKc7a5lu1wfg5UTS8dEMec+vWP3zewth8yJrCFZWfKE oJPQW1qJb+S7SM1zUZxEQpoMR/JMjIB3bUqtbDghvTFabWcobKXtQXBT/G1qkTlxm4b6 D4L3kXcd2z1FItOAtCwH8npYAo9dGgkRI4EGQ=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=C0/Bq5Q9Zd7WZeysmbyDP/12fU9xqMnZVyb7okvIqRgs+DqMslLUenA2lngXtNAuCq lNtR2Y89IFN8L5Wl22v9L2apTKTccpPiI1gzy7h+daHD5DvajVUI4aAcu+qM8MNeO55P z/WFfd19T4wFJ1G2ARVFBcUyhPCN0BICsuIT8=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hello All,

I am calling the hypercall to map the grant table on a HVM domain, on
the code I have the cmd and struct gnttab_setup_table required to call
the hypercall, yet on the struct you have XEN_GUEST_HANDLE as a type
to a list of frames, my environment does not include the whole of xen,
I have to include manually all the necessary structs and global
variables needed. But the XEN_GUEST_HANDLE gives me an error, can I
substitute the type with a simple array?

This is the code I am referring:

//This code is slightly modified.
 * GNTTABOP_setup_table: Set up a grant table for <dom> comprising at least
 * <nr_frames> pages. The frame addresses are written to the <frame_list>.
 * Only <nr_frames> addresses are written, even if the table is larger.
 *  1. <dom> may be specified as DOMID_SELF.
 *  2. Only a sufficiently-privileged domain may specify <dom> != DOMID_SELF.
 *  3. Xen may not support more than a single grant-table page per domain.
#define GNTTABOP_setup_table          2
struct gnttab_setup_table {
    /* IN parameters. */
    u32  dom;
    u32 nr_frames;
    /* OUT parameters. */
    u16  status;              /* GNTST_* */
    //??????????????XEN_GUEST_HANDLE(ulong) frame_list;
typedef struct gnttab_setup_table gnttab_setup_table_t;

Thanks for the help,


| +---------------------------------+ | This space intentionally blank
for notetaking.
| |   | Daniel Castro,                |
| |   | Consultant/Programmer.|
| |   | U Andes                         |

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>