[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [Xen-devel] VCPU Structure
On Fri, 2010-11-12 at 17:43 +0000, Nimgaonkar, Satyajeet wrote: > Hi Kaushik, > Here is what I wish to do. > I have implemented a custom hypercall in xen. Now i > need to access the memory pages that are being assigned to a > particular process. I intend to do this from the hypercall handler > itself. Once I have these memory pages, I will compute the hash > (Memory Integrity block) of it and store it in the VCPU structure. > This will help me save the state of the memory for a particular > process. Later I can check if some modification have been done to the > process by computing and matching the hash value with the one saved in > the VCPU. > It would be great if you could give me some insight on > how to achieve this. Any sample code or examples on this would help a > lot. > Thanks a lot. One way would be to use the MMU, you can mark those pages read-only in the page table and then you will get a pagefault for any write to such a page. In the fault handler you would mark the page as modified and unprotect it by setting it read/write again. That would save a lot of time doing expensive calculations when you could just use the existing hardware acceleration designed for exactly this purpose. See Volume 3, Chapter 4 of the Intel architecture software developers manual. Gianni _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |