Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5542865ybh; Wed, 7 Aug 2019 07:39:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAA4EosATpi4BAGlR9/+CwHeQPAozTzWgWWq+p2/2Z23ECjncjwYY7fP+j7eTsDIJIoSbf X-Received: by 2002:a17:90a:214e:: with SMTP id a72mr324422pje.0.1565188799322; Wed, 07 Aug 2019 07:39:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565188799; cv=none; d=google.com; s=arc-20160816; b=O6jqgl5Gz2btx7qsxywteyMwHDv/Sj3WUv90VxxZFFi8Go/2fbpbq013ECkkZlPFZd 5hXwqQUXjDK2z0DcoNcZYoQb3u6g0DUJ+RmCnsckMHOc9+MtbyVeqY1Hnn007ZKQr7AU IZyElfdmRtiT495UKIBLbyQ8XytWiRsE591wk+XT5ZzS0BFROzU7UCnqK3Rc0+t+ofS9 E2nSpKSQnzpT9kVuHuh8B+AtuamW5zp++jXKw7ZpUrxyQ40rkkGGjmegVjBrKI1e650q t0cGecYq9Mt2QuHQHLjrq/OSPrYLzRwJ1Fmk5Xb9sA/erX7Eu8zOudE4vAre7Bct3bhi YGYQ== 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:organization:from:references:cc:to:subject; bh=gNYBAtaJbZJEga8p/YDBrIM9YiAhFfqgH1y/qZFcOBs=; b=S0YRkzvavQg3bbJa1OERNMHqNiQnoptMwPVR/dcNYdB18rD8ukqi95NdudJp4mqrSz O3UsrVm/fkRN3d+KgTqBvmuyB0qT9ABF20YiEWkvfj/QfhBvQpb6Rjj1xfm0wo3wJYhZ /KMmlsLFNHKliaVHQQ3AKDLFfxnWyUPGttCZw5yixW7m1Hh3lnrp+O6MFmY4anLRhSl4 bIA6pLr+lCyiVdD8HwTiQt5qDEhhmhYOgazmFdFphZS9DHCDxo7gXwmBvdnj6LnssXRH 9houx2mpBpW/V09blSSWbzijBhgP/FlMonq8awto7Ylntzk1NzWqK2gKu1//U95lqTUg OPqw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c4si18620387pgk.257.2019.08.07.07.39.43; Wed, 07 Aug 2019 07:39:59 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388426AbfHGNvT (ORCPT + 99 others); Wed, 7 Aug 2019 09:51:19 -0400 Received: from foss.arm.com ([217.140.110.172]:48890 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388123AbfHGNvS (ORCPT ); Wed, 7 Aug 2019 09:51:18 -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 1D9F228; Wed, 7 Aug 2019 06:51:18 -0700 (PDT) Received: from [10.1.197.61] (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D77E03F706; Wed, 7 Aug 2019 06:51:16 -0700 (PDT) Subject: Re: [PATCH 6/9] KVM: arm64: Provide a PV_TIME device to user space To: Steven Price 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> <5aa54066-b9f6-22d1-fa2b-ce5cbf244ab5@arm.com> From: Marc Zyngier Organization: Approximate Message-ID: <9c416f28-d078-4575-8095-8b4cccfe40ec@kernel.org> Date: Wed, 7 Aug 2019 14:51:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <5aa54066-b9f6-22d1-fa2b-ce5cbf244ab5@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/08/2019 14:39, Steven Price wrote: > 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? Yes. Consistency is important. > 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. Having a dummy function for 32bit ARM is fine. Most of the code we add to the 32bit port is made of empty stubs anyway. Thanks, M. -- Jazz is not dead, it just smells funny...