linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] powernv: kvm: make _PAGE_NUMA take effect
@ 2014-01-21  8:15 Liu Ping Fan
  2014-01-21  9:42 ` Aneesh Kumar K.V
  0 siblings, 1 reply; 15+ messages in thread
From: Liu Ping Fan @ 2014-01-21  8:15 UTC (permalink / raw)
  To: linuxppc-dev, kvm-ppc, kvm
  Cc: Paul Mackerras, Alexander Graf, Aneesh Kumar K.V

To make sure that on host, the pages marked with _PAGE_NUMA result in a fault
when guest access them, we should force the checking when guest uses hypercall
to setup hpte.

Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
---
v2:
  It should be the reply to "[PATCH 2/4] powernv: kvm: make _PAGE_NUMA take effect"
  And I imporve the changelog according to Aneesh's suggestion.
---
 arch/powerpc/kvm/book3s_hv_rm_mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kvm/book3s_hv_rm_mmu.c b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
index 9c51544..af8602d 100644
--- a/arch/powerpc/kvm/book3s_hv_rm_mmu.c
+++ b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
@@ -232,7 +232,7 @@ long kvmppc_do_h_enter(struct kvm *kvm, unsigned long flags,
 		/* Look up the Linux PTE for the backing page */
 		pte_size = psize;
 		pte = lookup_linux_pte(pgdir, hva, writing, &pte_size);
-		if (pte_present(pte)) {
+		if (pte_present(pte) && !pte_numa(pte)) {
 			if (writing && !pte_write(pte))
 				/* make the actual HPTE be read-only */
 				ptel = hpte_make_readonly(ptel);
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-04-10 10:02 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-21  8:15 [PATCH v2] powernv: kvm: make _PAGE_NUMA take effect Liu Ping Fan
2014-01-21  9:42 ` Aneesh Kumar K.V
2014-01-27  9:11   ` Alexander Graf
2014-01-27 10:28     ` Aneesh Kumar K.V
2014-01-27 10:42       ` Alexander Graf
2014-01-27 15:57         ` Aneesh Kumar K.V
2014-01-27 10:41     ` Paul Mackerras
2014-04-03  2:36     ` Liu ping fan
2014-04-03 11:36       ` Alexander Graf
2014-04-03 11:38         ` Alexander Graf
2014-04-03 11:43           ` Alexander Graf
2014-04-07  7:42         ` Aneesh Kumar K.V
2014-04-07  8:36           ` Alexander Graf
2014-04-10  3:28             ` Liu ping fan
2014-04-10 10:02               ` Alexander Graf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).