]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Apply combination of host and l1 pte rc for nested guest
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>
Fri, 21 Dec 2018 03:28:41 +0000 (14:28 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Fri, 21 Dec 2018 03:37:43 +0000 (14:37 +1100)
commit3a2500b818c8e84307e8aa94d4590f9df7e0ad99
tree1813e44c5a9992a65f9fbda6a7aa053ff7e0ea91
parent96124f576bf801c7b4a13d7d136244285167de26
KVM: PPC: Book3S HV: Apply combination of host and l1 pte rc for nested guest

The shadow page table contains ptes for translations from nested guest
address to host address. Currently when creating these ptes we take the
rc bits from the pte for the L1 guest address to host address
translation. This is incorrect as we must also factor in the rc bits
from the pte for the nested guest address to L1 guest address
translation (as contained in the L1 guest partition table for the nested
guest).

By not calculating these bits correctly L1 may not have been correctly
notified when it needed to update its rc bits in the partition table it
maintains for its nested guest.

Modify the code so that the rc bits in the resultant pte for the L2->L0
translation are the 'and' of the rc bits in the L2->L1 pte and the L1->L0
pte, also accounting for whether this was a write access when setting
the dirty bit.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_hv_nested.c