Thread (97 messages) 97 messages, 6 authors, 2021-02-22

Re: [RFC PATCH v2 16/26] KVM: arm64: Prepare Hyp memory protection

From: Quentin Perret <hidden>
Date: 2021-02-09 10:09:44
Also in: kvmarm, linux-devicetree, lkml

On Thursday 04 Feb 2021 at 10:47:08 (+0000), Quentin Perret wrote:
On Wednesday 03 Feb 2021 at 14:37:10 (+0000), Will Deacon wrote:
quoted
quoted
+static void handle___pkvm_init(struct kvm_cpu_context *host_ctxt)
+{
+	DECLARE_REG(phys_addr_t, phys, host_ctxt, 1);
+	DECLARE_REG(unsigned long, size, host_ctxt, 2);
+	DECLARE_REG(unsigned long, nr_cpus, host_ctxt, 3);
+	DECLARE_REG(unsigned long *, per_cpu_base, host_ctxt, 4);
+
+	cpu_reg(host_ctxt, 1) = __pkvm_init(phys, size, nr_cpus, per_cpu_base);
__pkvm_init() doesn't return, so I think this assignment back into host_ctxt
is confusing.
Very good point, I'll get rid of this.
Actually not, I think I'll leave it like that. __pkvm_init can return an
error, which is why I did this in the first place And it is useful for
debugging to have it propagated back to the host.

Thanks,
Quentin

_______________________________________________
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