Thread (62 messages) 62 messages, 5 authors, 2021-08-01

Re: [PATCH 03/16] KVM: arm64: Turn kvm_pgtable_stage2_set_owner into kvm_pgtable_stage2_annotate

From: Marc Zyngier <maz@kernel.org>
Date: 2021-07-20 10:23:25
Also in: kvm, kvmarm, lkml

On Tue, 20 Jul 2021 11:09:21 +0100,
Quentin Perret [off-list ref] wrote:
On Thursday 15 Jul 2021 at 17:31:46 (+0100), Marc Zyngier wrote:
quoted
@@ -815,7 +807,7 @@ int kvm_pgtable_stage2_set_owner(struct kvm_pgtable *pgt, u64 addr, u64 size,
 		.arg		= &map_data,
 	};
 
-	if (owner_id > KVM_MAX_OWNER_ID)
+	if (!annotation || (annotation & PTE_VALID))
 		return -EINVAL;
Why do you consider annotation==0 invalid? The assumption so far has
been that the owner_id for the host is 0, so annotating a range with 0s
should be a valid operation -- this will be required when e.g.
transferring ownership of a page back to the host.
How do you then distinguish it from an empty entry that doesn't map to
anything at all?

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help