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

Re: [Xen-devel] remove entry in shadow table



Ok
I have no problem with overhead since I remove only 100 pages.
Thank you

Hannas

On Thu, 9 Apr 2015 11:27:16 +0100, Tim Deegan wrote:
Hi,

At 18:15 +0200 on 06 Apr (1428344115), HANNAS YAYA Issa wrote:
I want to remove entry of a given page in the shadow page table so that
when the next time the guest access to the page there is page fault.
Here is what I try to do:

1. I have a timer which wake up every 30 seconds and remove entry in
the shadow by calling
sh_remove_all_mappings(d->vcpu[0], _mfn(page_to_mfn(page)))
here "d" is the domain and "page" is the page that I want to remove
from the shadow page table.
2. In the function "sh_page_fault()" I get the gmfn and compare it with the mfn of the page that I removed earlier from the shadow page table.

Is this method correct?

Yes, though it may be extremely slow if you're doing it for large
numbers of mfns, since sh_remove_all_mappings() may have to do a
brute-force search of all PTEs for each one.

You should probably put your check for the gmfn in _sh_propagate(),
rather than sh_page_fault().  That way it will also see things like
prefetched mappings.

I also get this error: "sh error: sh_remove_all_mappings(): can't find
all mappings of mfn"

That usually means that there's a mapping of that frame from another
domain.

Tim.


_______________________________________________
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®.