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] [memory sharing] do_mmu_update skip unshare read only pages

To: xen devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [memory sharing] do_mmu_update skip unshare read only pages
From: MaoXiaoyun <tinnycloud@xxxxxxxxxxx>
Date: Sat, 29 Jan 2011 11:21:57 +0800
Cc: george.dunlap@xxxxxxxxxxxxx, tim.deegan@xxxxxxxxxx, juihaochiang@xxxxxxxxx
Delivery-date: Fri, 28 Jan 2011 19:22:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
Importance: Normal
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 :
 
   Recent test show do_mmu_update skip unshare read-only pages
   The log below share L1 entry is read-only. And from do_mmu_update code,
   it is designed to unshare the pages with flags _PAGE_RW
   My fix would be remove the if clause, any comments?
   thanks.
 
xen/arch/x86/mm.c -----------
 
                    /* XXX: Ugly: pull all the checks into a separate function.
                     * Don't want to do it now, not to interfere with mem_paging
                     * patches */
                    else if ( p2m_ram_shared == l1e_p2mt )                                                        & nbsp;                                         
                    {   
                        /* Unshare the page for RW foreign mappings */
                        if(l1e_get_flags(l1e) & _PAGE_RW)
                        {   
          &nb sp;                 rc = mem_sharing_unshare_page(pg_owner,
                                                          l1e_get_pfn(l1e),
                                                          0); 
                    &nbs p;       if(rc) break;
                        }   
                    } 
 

(XEN) printk: 33 messages suppressed.

(XEN) mm.c:869:d0 Error getting mfn 16e980 (pfn fffffffffffffffe) from L1 entry 800000016e980625 for l1e_owner=0, pg_owner=51 real_pg_owner 32755 k 1

(XEN) Debug page: MFN=16e980 is ci=800000000000000f, ti=840000000000000d, owner_id=32755

(XEN) ----[ Xen-4.0.0  x86_64  debug=n  Not tainted ]----

(XEN) CPU:    3

(XEN) RIP:    e008:[<ffff82c48015e003>] get_page_from_l1e+0x373/0x4e0

(XEN) RFLAGS: 0000000000010246   CONTEXT: hypervisor

(XEN) rax: 0000000000000000   rbx: 0000000000007ff3   rcx: 0000000000000092

(XEN) rdx: 000000000000000a   rsi: 000000000000000a   rdi: ffff82c48021ebc4

(XEN) rbp: 000000000016e980   rsp: ffff83063fd1fcc8   r8:  0000000000000001

(XEN) r9:  0000000000000001   r10: 00000000fffffff8   r11: 0000000000000005

(XEN) r12: 0000000000000033   r13: 0000000000000000   r14: 800000016e980625

(XEN) r15: ffff82f602dd3000   cr0: 0000000080050033   cr4: 00000000000026f0

(XEN) cr3: 000000055c154000   cr2: ffff88014724f5a8

(XEN) ds: 0000   es: 0000   fs: 0063   gs: 0000   ss: e010   cs: e008

(XEN) Xen stack trace from rsp=ffff83063fd1fcc8:

(XEN)    800000016e980625 0000000000000000 0000000000000033 ffff830500007ff3

(XEN)    ffff830600000001 ffff82c4801dfd59 0000000000000000 fffffffffffffffe

(XEN)    ffff8300bf556000 0000000000000001 ffffffffffffffff 0000000000800625

(XEN)    ffff8305f24f0000 0000000000000001 ffff830567f385a8 0000000000567f38

(XEN)    800000016e980625 ffff82c4801628ed 0000000000000033 0000000000000040

(XEN)    ffff82c4801447da ffff8300bf556000 0000000000000009 0000000000567f38

(XEN)    ffff83063fc30000 800000016e980625 0000000000567f38 ffff83063fd1fedc

(XEN)    0000000000000000 0000000d000001ce ffff8305067c2000 00000000000011ce

(XEN)    0000000000000000 0000000000000001 ffff830567f385a8 0000000000567f38

(XEN)    80000000011ce625 ffff82c480163fa4 0000000000000001 ffff82c480161aaa

(XEN)    ffff83063fd1fe88 ffff83063fd1fe88 00007ff000567f38 0000000000000000

(XEN)    0000000100000000 ffff8300bf556000 000000333fc30000 0000000000000000

(XEN)    000000014724f5a8 ffff82f60acfe700 0000000000000006 ffff83063fc30000

(XEN)    ffff8305f24f0000 ffff8300bf556000 ffff83063fd1ff28 0000004000000040

(XEN)    0000000000000000 ffff83063fd1ff28 ffff8800a8489c18 0000000000000009

(XEN)    0000000567f385a8 80000000011ce625 ffffffffffffffea 0000000000000246

(XEN)    0000003f004cc557 0000000000000100 0000000d004cc557 0000000000000001

(XEN)    0000000000000246 ffff8300bf556000 ffff8800a8489d68 0000000000000001

(XEN)    ffff8800bf171348 00007f4d2a0b5000 0000000000000001 ffff82c4801e3169

(XEN)    0000000000000001 00007f4d2a0b5000 ffff8800bf171348 0000000000000001

(XEN) Xen call trace:

(XEN)    [<ffff82c48015e003>] get_page_from_l1e+0x373/0x4e0

(XEN)    [<ffff82c4801dfd59>] ept_get_entry+0xa9/0x1c0

(XEN)    [<ffff82c4801628ed>] mod_l1_entry+0x37d/0x9b0

(XEN)    [<ffff82c4801447da>] __find_next_bit+0x6a/0x70

(XEN)    [<ffff82c480163fa4>] do_mmu_update+0x9f4/0x1a70

(XEN)    [<ffff82c480161aaa>] do_mmuext_op+0x85a/0x1320

(XEN)    [<ffff82c4801e3169>] syscall_enter+0xa9/0xae

(XEN)   

 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [memory sharing] do_mmu_update skip unshare read only pages, MaoXiaoyun <=