Re: Fpage mapping in L4 Pistachio
Katsumi Maruyama <[email protected]>
| Newsgroups | gmane.comp.micro-kernel.l4.l4ka.general |
|---|---|
| Message-ID | <[email protected]> |
Dear Espen Skoglund,: Thank you for your help. I added some KDB result. >>Let me call the mapping side process as Mapper, >>and mapped side process as Mappee. >> >> >>==== (1) Mappee ================== >> >> >>(1-1) Receive window >>Fpage: >>mappeefpage: L4_Fpage(0x40000000, 0x100000) >>i.e. 1 mega bytes recv window from 1 Giga >> >> >>==== (2) Mapper =================== >> >> >>(2-1) Buffer to send/receive data >>char xbuf[XSIZE]; >>// This buffer happened being allocated (unfortunately !) at 0xA26820. >> >> >>====== (3) Situation ======== >> >> >>(3-1) WHEN XSIZE <= 6112: No problem >> >> >>Fpage of Mapper: >>mapperfpage: L4_Fpage(0xA26000, 0x2000) with R/W permissions >> >> >>MapItem: >>mapitem: L4_MapItem(mapperfpage, 0) >>i.e. send-base is 0. >> >> >>Fpage is mapped, and data is rightly copyed from Mappee to Mapper. >> >> > >>From mapper to mappee you mean, right? > >And the xbuf[] array is accessible at address 0x40000820 of mappee. > > Yes, it can be accessed at 0x40000820. >BTW, saying "copied" here can be confusing. Copying and mapping are >not the same thing. > > I meant: strncpy(0x40000820, mappeeOwnBuffer, SIZE); i.e. mappee --> mapper Right after receiving the mapping-IPC, I confirmed the mappint using KDB d command. d 40000820 >memdump Dump address [0x0]: 0x40000820 40000820 00000000 00000000 00000000 00000000 ....... .... (3-2) WHEN XSIZE > 6112: COPY FAILED >>Fpage of Mapper: >>mapperfpage: L4_Fpage(0xA20000, 0x10000) with R/W permissions >>// To cover the buffer, Fpage becomes large ! >>// as the buffer happened to be at 0xA26820 ! >>MapItem: >>mapitem: L4_MapItem(mapperfpage, 0) >>i.e. send-base is 0. >> >> > >And the xbuf[] array should now be accessible at address 0x40006820 of >mappee. Is this not happening? > > I expected the mapping at 0x40006820, but it seemed not-mapped. KDB d command answered: d 0x40006820 >memdump Dump address [0x0]: 0x40006820 0x40006820 ######## ######## ######## ######## ..... >>( Cf. 0xA26820 + 6112 == 0xA28000. >>&xbuf[6112] is 0xA28000) >> >> >>===== (4) Question ====== >> >> >>Am I misunderstanding the fpage mapping usage, or >>are there some restriction or limitation in L4 flex page mapping ? >> >> > >I don't know if you misunderstood it because I don't know what you >expect to happen. The limitation of mapping is that pages not present >in the mapper will (obviously) not be mapped to the mappee. Also, >mapper can not map its own KIP or UTCB memory, and mappee can not >receive mappings in its own KIP and UTCB memory. > > Before the mapping IPC call, mapper filled the buffer with 0, thus pages are present. Umm. my test code seems not conflicting with the limitation. --- K. Maruyama, L4-devotee NII, Japan