Thread (46 messages) 46 messages, 7 authors, 2020-07-29

Re: [PATCH 6/9] KVM: arm64: Provide a PV_TIME device to user space

From: Steven Price <steven.price@arm.com>
Date: 2019-08-07 13:39:19
Also in: kvm, kvmarm, linux-doc, lkml

On 03/08/2019 18:34, Marc Zyngier wrote:
On Sat, 3 Aug 2019 13:51:13 +0100
Marc Zyngier [off-list ref] wrote:

[forgot that one]
quoted
On Fri,  2 Aug 2019 15:50:14 +0100
Steven Price [off-list ref] wrote:
[...]
quoted
quoted
+static int __init kvm_pvtime_init(void)
+{
+	kvm_register_device_ops(&pvtime_ops, KVM_DEV_TYPE_ARM_PV_TIME);
+
+	return 0;
+}
+
+late_initcall(kvm_pvtime_init);
Why is it an initcall? So far, the only initcall we've used is the one
that initializes KVM itself. Can't we just the device_ops just like we
do for the vgic?
So would you prefer a direct call from init_subsystems() in
virt/kvm/arm/arm.c?

The benefit of initcall is just that it keeps the code self-contained.
In init_subsystems() I'd either need a #ifdef CONFIG_ARM64 or a dummy
function for arm.

Steve

_______________________________________________
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