Hi,

I am writing a driver for a device that accesses some in-memory data 
structures. Right now I'm using page_alloc(&mem_pool, ...) to allocate those 
structures, but I suspect this memory is cacheable, and thus updates to the 
in-memory structures won't necessarily be visible to the device.

There is enum paging_coherent in hypervisor/include/jailhouse/paging.h that is 
passed as an argument to paging_create() that does exactly what I want. But 
there doesn't seem to be any API/memory pool that allocates memory using this 
flag.

I tried allocating memory from the remap pool, and then remapped that memory to 
the same address but with PAGING_COHERENT instead. But that causes an exception 
as soon as anything tries to access the memory.

What is the recommended way to allocate coherent memory?

-- 
Regards,
Pratyush Yadav

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/7b93d482-cce6-ffd4-291e-7e372f61cd89%40ti.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to