Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5494018ybh; Wed, 7 Aug 2019 06:57:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyXzsBWdhf+jnvIuggKe1ZG36tA95IQxNZozjG8NyEhv0ygh8LeyPy4VTKksHsgGucrS6t X-Received: by 2002:a63:b20f:: with SMTP id x15mr8101941pge.453.1565186261844; Wed, 07 Aug 2019 06:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565186261; cv=none; d=google.com; s=arc-20160816; b=W0dGOrDI7t3tgpllw6gohsqEAnEvWH2zq85oPRBywS8U4V8HL9/SXqGCN6Pjr/eFe3 Kx7K+Ashe7+CZumSEEaJKB3pYDrvG7PTxerhDAfZdDGteO+JRLfrhRrTeQYAEdcfN8Ql HEsDE+Nv9B22KPuUQCUvFxsEN7i5/GiQa/+RfnVdKuIE0s3aBtiADJeMkSaAEyYGA8Y8 Yv8YoV6r7zKkz1BjC4uOkUU2NxKBbxxSRQL/ImxmvMimXineCyE03f0XaYMxiN2R99nB pO4EVDcoj2O0W1EP/KkfrorHkLgBsWLbB9IaYE+QLfoZaseMmOkSGT+WR8qBa66ddsQW LvVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=fRPKkbiEg7kvtzoCnpMBdf8+bX8pcd2cZd5aXaMcbpU=; b=p61+OZeOr04Bras4Q/vp6LUeKdF9Lk3fmQU57CNGrFNo034UG5DAy8FX6Nk+tXfwpP cqloHV5bgzc/D7hLc3m58DMdxHkGEAXopXgl9qJcLINkEHZ2HmZx904B6hbM1Hqkv/1y KLLvU7VcexmLuwfvLV1L1k3LlD0AG0pgy6vdciYERHn6kt4fVCTURFCyLyTXFWyHOOcf HyfK+BXejVKbeD67oO5gm4X4r/CvJKk7adPg5UULnh5IZmRAbruuM92lqbsiXB4WdYLi a2R/XBUZqOfk/jqOavVmDWZBB8Wf/+OWAdkY/992WVoyEiKmvH1j0YUVU3hC4ILN07C3 JeOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i69si51597897pge.366.2019.08.07.06.57.26; Wed, 07 Aug 2019 06:57:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388601AbfHGNjR (ORCPT + 99 others); Wed, 7 Aug 2019 09:39:17 -0400 Received: from foss.arm.com ([217.140.110.172]:48710 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388357AbfHGNjQ (ORCPT ); Wed, 7 Aug 2019 09:39:16 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 024B528; Wed, 7 Aug 2019 06:39:16 -0700 (PDT) Received: from [10.1.196.133] (e112269-lin.cambridge.arm.com [10.1.196.133]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 63FC23F706; Wed, 7 Aug 2019 06:39:14 -0700 (PDT) Subject: Re: [PATCH 6/9] KVM: arm64: Provide a PV_TIME device to user space To: Marc Zyngier Cc: kvm@vger.kernel.org, linux-doc@vger.kernel.org, Catalin Marinas , linux-kernel@vger.kernel.org, Russell King , Paolo Bonzini , Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org References: <20190802145017.42543-1-steven.price@arm.com> <20190802145017.42543-7-steven.price@arm.com> <20190803135113.6cdf500c@why> <20190803183335.149e0113@why> From: Steven Price Message-ID: <5aa54066-b9f6-22d1-fa2b-ce5cbf244ab5@arm.com> Date: Wed, 7 Aug 2019 14:39:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190803183335.149e0113@why> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/08/2019 18:34, Marc Zyngier wrote: > On Sat, 3 Aug 2019 13:51:13 +0100 > Marc Zyngier wrote: > > [forgot that one] > >> On Fri, 2 Aug 2019 15:50:14 +0100 >> Steven Price wrote: > > [...] > >>> +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