aboutsummaryrefslogtreecommitdiff
path: root/scripts/Makefile.clean
diff options
context:
space:
mode:
authorPaul Mackerras2014-05-26 19:48:39 +1000
committerAlexander Graf2014-05-30 14:26:29 +0200
commit6c576e74fd91b93ca1eedcd9eb5200171d2ba32b (patch)
tree6b7563c0ef1a9b9f1166ea3b594220de96c7981a /scripts/Makefile.clean
parent687414bebe30d59c766b682cf86b1c5fa92d7af9 (diff)
KVM: PPC: Book3S HV: Make sure we don't miss dirty pages
Current, when testing whether a page is dirty (when constructing the bitmap for the KVM_GET_DIRTY_LOG ioctl), we test the C (changed) bit in the HPT entries mapping the page, and if it is 0, we consider the page to be clean. However, the Power ISA doesn't require processors to set the C bit to 1 immediately when writing to a page, and in fact allows them to delay the writeback of the C bit until they receive a TLB invalidation for the page. Thus it is possible that the page could be dirty and we miss it. Now, if there are vcpus running, this is not serious since the collection of the dirty log is racy already - some vcpu could dirty the page just after we check it. But if there are no vcpus running we should return definitive results, in case we are in the final phase of migrating the guest. Also, if the permission bits in the HPTE don't allow writing, then we know that no CPU can set C. If the HPTE was previously writable and the page was modified, any C bit writeback would have been flushed out by the tlbie that we did when changing the HPTE to read-only. Otherwise we need to do a TLB invalidation even if the C bit is 0, and then check the C bit. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'scripts/Makefile.clean')
0 files changed, 0 insertions, 0 deletions