How to find first free entry in PTE

How to find first free entry in PTE

Hi all, I'm not really sure if this is a valid question in this forum but how can I find the first free entry in the PTE?I was looking the volume 3A of intel manuals for some flag, but nothing. Can you help me?

Regards,irp

publicaciones de 6 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

Hi, I don't have a direct answer for your questions yet. After searching around, I found a couple of threads that could provide some hints for your questions. Here are the two existing threads in this forum:

EPT: Strange VM-Exits

EPT write back memory type and Machine Check exception

-Thai

I found out how to do that, thanks anyway!irp

Great,is this something that you can share for other to learn from your finding?
Thanks,
-Thai

Yes sure. I will try, because I don't really know this method is correct.First I check for the pte entry looking for the descriptor entry with PS=0*pdeB = __CR3_READ(pdeBase); oldPdeB = *pdeB; for (*pdeB; *pdeB < MAX_PTE_SIZE; *pdeB++) { if (pdeB[7] == 0) break; continue; }*pdeB = __CR3_READ(pdeBase); oldPdeB = *pdeB; for (*pdeB; *pdeB < MAX_PTE_SIZE; *pdeB++) { if (pdeB[7] == 0) break; continue; }Then I just check for the first table entry with preset flag set (it must be one to map a 4kb page)*pteBase = __SET_PDE(*pdeB); oldPteBase = *pteBase; for (*pteBase; *pteBase < MAX_PTE_SIZE; *pteBase++) { if (pteBase[0] == 1) break; continue; }Maybe I'm missing something, so it that case, help me.Thanks,irp

Thanks for sharing! You can also check on http://www.xen.org/products/xen_source.htmlfor more ideas.
-Thai

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya