WARNING - OLD ARCHIVES

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

xen-devel

[Xen-devel] HVM (hypercall_grant_table_op) Problem

To: "Xen-devel" <Xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] HVM (hypercall_grant_table_op) Problem
From: "马耀" <327801865@xxxxxx>
Date: Fri, 18 Nov 2011 00:52:13 +0800
Cc:
Delivery-date: Thu, 17 Nov 2011 08:53:25 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s0907; t=1321548735; bh=3qeZoox1mxIhUL7rgOJz5bjmmRs7Q0DDLBEoRaqyP38=; h=X-QQ-SSF:X-QQ-BUSINESS-ORIGIN:X-Originating-IP:X-QQ-STYLE: X-QQ-mid:From:To:Subject:Mime-Version:Content-Type: Content-Transfer-Encoding:Date:X-Priority:Message-ID:X-QQ-MIME: X-Mailer:X-QQ-Mailer; b=EXDVmL4f3PnOGWX6D99oSS1Q+hBfmaEEUnnwXUAkcen+U+ZoyQbZmC9m0484TFMIP /wNEqza/T7Iqw841xxoQ+PAE1O4Zha/iq5cuftV5JpVnc9yeO3GH3jEMuKjCtb8
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
Hi:
    I modified the netfont.c of Linux HVM domU installed PVonHVM.In it, I call hypercall_grant_table_op
(GNTTABOP_map_grant_ref...), then dom0 shutdown and restart at once.
    I'm confused about this.
    Before Xen 3.4.3, Xen/arch/x86/HVM/hvm.c look like this:
static long hvm_grant_table_op(unsigned int cmd, XEN_GUEST_HANDLE(void) uop, unsigned int count)
{
    if ( (cmd != GNTTABOP_query_size) && (cmd != GNTTABOP_setup_table) )
        return -ENOSYS; /* all other commands need auditing */
    return do_grant_table_op(cmd, uop, count);
}
    I know it hadn't support all grant_table_op but only two:GNTTABOP_query_size and GNTTABOP_setup_table.
 
    Now, after Xen4.0.0 and later, it look like below:
static long hvm_grant_table_op( unsigned int cmd, XEN_GUEST_HANDLE(void) uop, unsigned int count)
{
    if ( !grant_table_op_is_allowed(cmd) )
        return -ENOSYS; /* all other commands need auditing */
    return do_grant_table_op(cmd, uop, count);
}
static int grant_table_op_is_allowed(unsigned int cmd)
{
    switch (cmd) {
    case GNTTABOP_query_size:
    case GNTTABOP_setup_table:
    case GNTTABOP_set_version:
    case GNTTABOP_copy:
    case GNTTABOP_map_grant_ref:
    case GNTTABOP_unmap_grant_ref:
        return 1;
    default:
        /* all other commands need auditing */
        return 0;
    }
}
    From above, I conclude that I can map a HVM's page to another HVM, just like two PVs.
Am I wrong? Who can give me some suggestion?
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] HVM (hypercall_grant_table_op) Problem, 马耀 <=