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] problem in accessing dom0 page from domU PVHVM guest

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] problem in accessing dom0 page from domU PVHVM guest
From: veerasena reddy <veeruyours@xxxxxxxxx>
Date: Wed, 29 Jun 2011 17:25:44 +0530
Delivery-date: Wed, 29 Jun 2011 04:56:30 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=cqLCzDFkSgfnXE/NGQnlxm3gwWmpK+ys4ZZdrV7444U=; b=ZI3qpngjTUYcOzQlL/CyeJSlWLnF+4iD6yJhQLu6Uo9qmn0bZa98vpfkZ6Q3HXl2bK ohL8bs/IJxQhvNA4bdZOhGjfCprCe2vypbrchnl3qiHP+llEQmjYIEfnM5HMtc/KH212 LNoPVbBGEhSYDaJM4dajs0ugxszhVEnGHSnEg=
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 could successfully access domU page from dom0 but when i tried accessing dom0 page from domU the grant table operations are successful but when i tried to print the contents of the mapped page, it crashes with page fault message "BUG: unable to handle kernel paging request at ffffc90000590000". Please find below the relevant domU module source and the crash dump.

Can anyone please help me in fixing this?

Thanks in Advance.

Regards,
VSR.

======= domU code ========
        struct vm_struct *v_start;

        printk("\nxen: domU: init_module with gref = %d", gref); <<-- gref (grant reference is passed as a module parameter)

        // The following function reserves a range of kernel address space and
        // allocates pagetables to map that range. No actual mappings are created.
        v_start = alloc_vm_area(PAGE_SIZE);
        if (v_start == 0) {
                free_vm_area(v_start);
                printk("\nxen: dom0: could not allocate page");
                return -EFAULT;
        }

      gnttab_set_map_op(&ops, (unsigned long)v_start->addr, GNTMAP_host_map, gref, 0); /* flags, ref, domID */

      if (HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, &ops, 1)) {
            printk("\nxen: domU: HYPERVISOR map grant ref failed");
            return -EFAULT;
      }

      if (ops.status) {
            printk("\nxen: domU: HYPERVISOR map grant ref failed status = %d",
                        ops.status);
      }
      printk("\nxen: domU: shared_page = %p, handle = %x, status = %x",
                  v_start->addr, ops.handle, ops.status);

      printk("\nContents of the mapped page ");
      for(i=0;i<=10;i++)
      {
            printk("%c", ((char*)(v_start->addr))[i]);   <<<--- crashes here
      }
=========  crash message (on DomU) =========
root@PVHVM-domU:~/test_programs/page_share_interdomain# dmesg -c

[16259.922417] xen: domU: init_module with gref = 9   <<<<<--- grant ref passes as module param
[16259.928763] xen: domU: shared_page = ffffc90000590000, handle = 3, status = 0  <<<<<--- the status code shows SUCCESS
[16259.928871] Contents of the mapped page                 <<<<<<<<<<--- trying to print the bytes in page; crash !!!!
[16259.929126] BUG: unable to handle kernel paging request at ffffc90000590000
[16259.929130] IP: [<ffffffffa010b185>] init_module+0x155/0x17c [domu_share2]
[16259.929144] PGD 3fd25067 PUD 3fd26067 PMD 3e667067 PTE 0
[16259.929178] Oops: 0000 [#3] SMP
===========================

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] problem in accessing dom0 page from domU PVHVM guest, veerasena reddy <=