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

Re: [Xen-devel] [PATCH v3 0/3] map grant refs at pfn = mfn



On 1 August 2014 16:13, Stefano Stabellini
<stefano.stabellini@xxxxxxxxxxxxx> wrote:
> On Fri, 1 Aug 2014, Thomas Leonard wrote:
>> On 24/07/14 14:30, Stefano Stabellini wrote:
>> > Hi all,
>> > this patch series introduces a second p2m mapping of grant reference on
>> > ARM at guest physical address == machine address of the grant ref.  It
>> > is safe because dom0 is already mapped 1:1. We export
>> > XENFEAT_grant_map_identity to signal the guest that this second p2m
>> > mapping is
>> > available.
>> >
>> > One reason for wanting the second p2m mapping is to avoid tracking mfn
>> > to pfn mappings in the guest kernel. Since the same mfn can be granted
>> > multiple times to the backend, finding the right pfn corresponding to a
>> > given mfn can be difficult and expensive. Providing a second mapping at
>> > a known address allow the kernel to access the page without knowing the
>> > pfn.
>>
>> Is there a version of these patches for Xen 4.4 that I can test? The
>> restriction on duplicate pages is causing trouble for networking on Mirage 
>> too
>> (http://roscidus.com/blog/blog/2014/07/28/my-first-unikernel/#tcp-retransmissions).
>
> The backport is non-trivial because
> 552710b388630dfa461932940a998e120c42277d is missing from 4.4,
> nonetheless it wasn't too hard to port:
>
>   git://xenbits.xen.org/people/sstabellini/xen-unstable.git 
> grant_map_identity_4.4

Thanks. I merged it with the stable-4.4 branch (as that has some
useful fixes too), but it crashed for me when I started my Mirage
guest:

Xen BUG at grant_table.c:729
(XEN) CPU1: Unexpected Trap: Undefined Instruction
(XEN) ----[ Xen-4.4.1-rc1  arm32  debug=y  Not tainted ]----
(XEN) CPU:    1
(XEN) PC:     00245f64 __bug+0x2c/0x48
(XEN) CPSR:   200b015a MODE:Hypervisor
(XEN)      R0: 0026c6dc R1: 00000003 R2: 3fd23d80 R3: 200b015a
(XEN)      R4: 000002d9 R5: 00262a34 R6: 40027000 R7: 0009dcae
(XEN)      R8: 4ffe3e30 R9: 00000000 R10:00000000 R11:4002fddc R12:00000004
(XEN) HYP: SP: 4002fdd4 LR: 00245f64
(XEN)
(XEN)   VTCR_EL2: 80002558
(XEN)  VTTBR_EL2: 00010000bec06000
(XEN)
(XEN)  SCTLR_EL2: 30cd187f
(XEN)    HCR_EL2: 000000000038283f
(XEN)  TTBR0_EL2: 00000000ae010000
(XEN)
(XEN)    ESR_EL2: 00000000
(XEN)  HPFAR_EL2: 000000000001c810
(XEN)      HDFAR: e0800f00
(XEN)      HIFAR: 7d69b44d
(XEN)
(XEN) Xen stack trace from sp=4002fdd4:
(XEN)    00000000 4002fedc 0021043c 40027000 4002fe68 00000007 4002fe04 00000000
(XEN)    00000000 00000001 00000000 002ee500 00000000 002ee298 00000000 00090001
(XEN)    40020008 002ef614 00000000 002ee500 00000001 d9939880 002ee298 4002501c
(XEN)    00000000 00000001 002ee500 4ffe4000 d9939880 40027000 40026e30 00000000
(XEN)    00000000 0000ef13 0000f1db 40005bf8 02bb95c0 0009dcae 0000ee6b 00002800
(XEN)    00000000 6dfba000 00000000 00000002 00000001 00000001 ffffffff 00000000
(XEN)    00000000 c0c6f118 00000000 00000001 00000000 00000000 00000000 00007ff0
(XEN)    00000000 00000000 4002ff58 c020e6b4 00000000 00000001 00000ea1 c0b71028
(XEN)    00000000 4002ff54 00255300 d99391c0 0025272c 4002ff0c 00230e88 00000001
(XEN)    002b9ff0 002b6000 002ef614 0026cb80 002b9ff0 4002ff3c 40039954 00000000
(XEN)    ffffffff 002ef614 00000001 c0c6f0f8 c0b731c4 00000001 c0c6f120 dbd98740
(XEN)    d99391c0 db58a898 00000000 00000001 d9939880 c0b71028 00000000 4002ff58
(XEN)    00257d10 00000000 d9939880 00000001 00000001 d99391c0 db58a898 00000000
(XEN)    00000001 d9939880 c0b71028 00000000 d9939b80 00000014 ffffffff b6f249f8
(XEN)    c020e6b4 600b0013 f7ffffff be88ea9c c0c35c00 c0212f40 db681e48 c0499794
(XEN)    c0c35c0c c0213160 c0c35c18 c0212fa0 00000000 00000000 00000000 00000000
(XEN)    00000000 00000000 bfffffff 400b0030 800b0193 20010093 60010193 00000000
(XEN)    ffffffff ffffffff ffffffff
(XEN) Xen call trace:
(XEN)    [<00245f64>] __bug+0x2c/0x48 (PC)
(XEN)    [<00245f64>] __bug+0x2c/0x48 (LR)
(XEN)    [<0021043c>] do_grant_table_op+0x94c/0x2e8c
(XEN)    [<00255300>] do_trap_hypervisor+0xb4c/0xea8
(XEN)    [<00257d10>] return_from_trap+0/0x4
(XEN)
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 1:
(XEN) CPU1: Unexpected Trap: Undefined Instruction
(XEN)
(XEN) ****************************************
(XEN)
(XEN) Reboot in five seconds...

My merged version is here (there were no conflicts):

https://github.com/talex5/xen/tree/stable-4.4


-- 
Dr Thomas Leonard        http://0install.net/
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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