Re: [PATCH v7 4/7] kvmppc: Handle memory plug/unplug to secure VM

From
Christoph Hellwig <hch@lst.de>
Date
2019-08-29 08:39:32
Also in
linux-mm
Reply to
Bharata B Rao, 2019-08-22
On Thu, Aug 22, 2019 at 03:56:17PM +0530, Bharata B Rao wrote:
quoted hunk ↗ jump to hunk
+	/*
+	 * TODO: Handle KVM_MR_MOVE
+	 */
+	if (change == KVM_MR_CREATE) {
+		uv_register_mem_slot(kvm->arch.lpid,
+				     new->base_gfn << PAGE_SHIFT,
+				     new->npages * PAGE_SIZE,
+				     0, new->id);
+	} else if (change == KVM_MR_DELETE)
+		uv_unregister_mem_slot(kvm->arch.lpid, old->id);
 }
In preparation for the KVM_MR_MOVE addition just using a switch statement
here from the very beginning might make the code a little nicer to read.
Thread (25 messages) 25 messages, 5 authors, last reply 2019-09-06
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help