]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Make HPT reading code notice R/C bit changes
authorPaul Mackerras <paulus@samba.org>
Thu, 18 Apr 2013 19:50:24 +0000 (19:50 +0000)
committerAlexander Graf <agraf@suse.de>
Fri, 26 Apr 2013 18:27:12 +0000 (20:27 +0200)
commit5a16546a9ec165e796bdf54f858e247dc27f4511
tree7bbe9a95f283307775ec93dd95b2e02173a5487c
parenta325f3f7e89a217e58839adfb19f6b7b003837cb
KVM: PPC: Book3S HV: Make HPT reading code notice R/C bit changes

At present, the code that determines whether a HPT entry has changed,
and thus needs to be sent to userspace when it is copying the HPT,
doesn't consider a hardware update to the reference and change bits
(R and C) in the HPT entries to constitute a change that needs to
be sent to userspace.  This adds code to check for changes in R and C
when we are scanning the HPT to find changed entries, and adds code
to set the changed flag for the HPTE when we update the R and C bits
in the guest view of the HPTE.

Since we now need to set the HPTE changed flag in book3s_64_mmu_hv.c
as well as book3s_hv_rm_mmu.c, we move the note_hpte_modification()
function into kvm_book3s_64.h.

Current Linux guest kernels don't use the hardware updates of R and C
in the HPT, so this change won't affect them.  Linux (or other) kernels
might in future want to use the R and C bits and have them correctly
transferred across when a guest is migrated, so it is better to correct
this deficiency.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/include/asm/kvm_book3s_64.h
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_hv_rm_mmu.c