[Linuxppc-uv] [PATCH] core: Mark gfn as GPF_UNSHARED during page in after unsharing

Fabiano Rosas farosas at linux.ibm.com
Fri Nov 13 07:05:21 AEDT 2020


When unsharing a page range the ultravisor issues H_SVM_PAGE_IN calls
with the H_PAGE_IN_NONSHARED flag. The hypervisor is not guaranteed to
reply with an UV_PAGE_IN call, so we mark the guest page as
GPF_HV_UNSHARED right after the H_SVM_PAGE_IN call returns.

In the event that the hypervisor issues an UV_PAGE_IN for a page that
is in the GPF_HV_UNSHARING state, we would want to mark the page as
GPF_HV_UNSHARED instead of keeping the state the same as is currently
done.

Signed-off-by: Fabiano Rosas <farosas at linux.ibm.com>
---
 core/svm_host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/svm_host.c b/core/svm_host.c
index 830a538..8684a37 100644
--- a/core/svm_host.c
+++ b/core/svm_host.c
@@ -1287,7 +1287,7 @@ int handle_page_in(u64 lpid, u64 hv_page, gpa_t gpa, u64 flags, u64 order)
 
 	case GPF_HV_UNSHARING:
 	case GPF_HV_UNSHARING_INV:
-		svm_hv_unsharing_gfn(svm, gfn);
+		svm_hv_unshared_gfn(svm, gfn);
 		break;
 
 	case GPF_HV_SHARED:
-- 
2.25.4



More information about the Linuxppc-uv mailing list