Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1421404ybp; Wed, 9 Oct 2019 13:57:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4dPvpc34cHzYZJT6D8TjAYE7idhs2s0afUYjI9jF2nRlrHVXgsjYbygXhPghw7zdhlZqz X-Received: by 2002:a17:907:10dc:: with SMTP id rv28mr4741048ejb.7.1570654655689; Wed, 09 Oct 2019 13:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570654655; cv=none; d=google.com; s=arc-20160816; b=A2OAnrDY3sIpns4ORdqE2X4bqq7ammfHa7SYXjSVkTWXOMTpN2lGF8s2gLXucYqrXW lJkDwjJ6lAT483IhRsrKt8XS/7h7o80410u1NC36MAIorjg/5Ugycg4n5iC0YmqryaO6 CRWvZ8NRI8Uam2Fu4RVsupwnI6BGOfoA0NI8MOnaBPpT1DvufbJG2s75Sd6QVZ6hc9hY tpzznaZ+v/jCHXQbz2A0DfAdl9YcvV/8zeqqIckdJJtCd9ufr8GeQpneKJKnlf1mobMQ tI3+URcs5bh4zVZQAdz4KazPbTtf/rdbaMlF+/RHAQNBQS7Qa7y/ckCPXoLCCtePfA9f KdQw== 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:openpgp:from:references:cc:to:subject:dkim-signature; bh=ghIP95f1Z5BF2VVaSb+qX/U3Se4vmJoP2nIW78TEjoY=; b=C3orWMDLzwOvD1olHNgWTuUfxZG7uqV20ykjjPpiKGidVBjAE8f87kysWTZGEk3sqO YL1pbxD4Vcm1fgLd+6gdF8OtZigKMwboviKPEBup6yM/+Rhn0egsGcZo+3sF/Lb0T4Qy LkjIoSxTk9lgruzKhRUYptzieh/MVRAAR50VxEBIw7yfrTwHTBkDhqUuAswWr9VGx2Dh PdvpUtyyVsKzMckURZP2/koGWRrLn2IKCBy+r0UWXNsQWUDLdKib7Wxj+K9eQi0u99Hu yy5EKbeLg4BB5xfcyB0daWVIzIKuD60TolSWKUvQyOmZbmaEJcIqu9kuCe+9m3lRuzEf QkCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=i9LVAPE8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j18si1801456ejv.201.2019.10.09.13.57.11; Wed, 09 Oct 2019 13:57:35 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=i9LVAPE8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731145AbfJIU4v (ORCPT + 99 others); Wed, 9 Oct 2019 16:56:51 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:29068 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729535AbfJIU4u (ORCPT ); Wed, 9 Oct 2019 16:56:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1570654608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:openpgp:openpgp; bh=ghIP95f1Z5BF2VVaSb+qX/U3Se4vmJoP2nIW78TEjoY=; b=i9LVAPE8k7sOOzaX6mY+9amjngK1sP4arpp391Mdo8vJC+JeJ7rMbuNORPJcDI/2s6YtHq Pmy3Ht7L+ntmD+OiPmMM9lczt5mxYtagbcxemRnzppX9QQV7v2cKDTXNs2YStPUqUAU+ez FRadw6++MO9bRe4pxa4jb5LRCGnCAWU= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-228-a7gJsP6aNs-AFydwhfirVQ-1; Wed, 09 Oct 2019 16:56:47 -0400 Received: by mail-wr1-f71.google.com with SMTP id o10so1637559wrm.22 for ; Wed, 09 Oct 2019 13:56:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XMFIvbI7tuwGap0RnIGe77DNy9RYz81HW2Xoa3VtEyQ=; b=sDOPQr6ye8yNMkY7CcFyIYUpXIbeEjt71xLj9twU0tfwAzDdueA+BBNGV2tSVlwxWE ybN3fsk2BxAIvNU//dPQy+emNZ4gmEWH6U+hrrSG64QJpe2lDxpi6FolZhfhRYN80sHn Qkoi675J2oia2NFBk9Cfo0dDo6ZULkA/PHlJSevlWcyKOTBuLMuxb7+vDaJyZiiAyQll s1qzUxe3rNp0xjEH0HiF8KouRRDLuNX2XINUQVE65eUrBkIgJ45CEgFdOmzQeundGMW1 atGOe5D1afDm90Kg+p3xoQME4Sh0GWQzWH6g3KtsEcM5haLW5jZ4hNrHLmqgtq3a+YNl PSZA== X-Gm-Message-State: APjAAAUAk5+fhnSURjgxh8BuJ1o7Mjq9/ZggWxdiJ4oOWWmOiQ0g7pB0 s9iQsR3O6hhDye7h2uUXdxkMSEYSFbXFNSSGB+Mh8OltwfdLi83cVGyUFM16QMH/B24jIFqYRsm FBAwfCj+vIG1waakdk4N9DjzI X-Received: by 2002:adf:dc8c:: with SMTP id r12mr4466708wrj.107.1570654606021; Wed, 09 Oct 2019 13:56:46 -0700 (PDT) X-Received: by 2002:adf:dc8c:: with SMTP id r12mr4466689wrj.107.1570654605662; Wed, 09 Oct 2019 13:56:45 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:1032:7ea1:7f8f:1e5? ([2001:b07:6468:f312:1032:7ea1:7f8f:1e5]) by smtp.gmail.com with ESMTPSA id z189sm6026703wmc.25.2019.10.09.13.56.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Oct 2019 13:56:44 -0700 (PDT) Subject: Re: [RFC PATCH v3 4/6] psci: Add hvc call service for ptp_kvm. To: John Stultz Cc: "Jianyong Wu (Arm Technology China)" , Marc Zyngier , "netdev@vger.kernel.org" , "yangbo.lu@nxp.com" , "tglx@linutronix.de" , "sean.j.christopherson@intel.com" , "richardcochran@gmail.com" , Mark Rutland , Will Deacon , Suzuki Poulose , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , Steve Capper , "Kaly Xin (Arm Technology China)" , "Justin He (Arm Technology China)" , nd , "linux-arm-kernel@lists.infradead.org" References: <20190918080716.64242-1-jianyong.wu@arm.com> <20190918080716.64242-5-jianyong.wu@arm.com> <83ed7fac-277f-a31e-af37-8ec134f39d26@redhat.com> <629538ea-13fb-e666-8df6-8ad23f114755@redhat.com> <56a5b885-62c8-c4ef-e2f8-e945c0eb700e@redhat.com> <1cc145ca-1af2-d46f-d530-0ae434005f0b@redhat.com> <6b8b59b2-a07e-7e33-588c-1da7658e3f1e@redhat.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: <797af843-6ed4-349c-55bf-73a0dab1249b@redhat.com> Date: Wed, 9 Oct 2019 22:56:43 +0200 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: Content-Language: en-US X-MC-Unique: a7gJsP6aNs-AFydwhfirVQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/10/19 18:05, John Stultz wrote: > On Wed, Oct 9, 2019 at 2:13 AM Paolo Bonzini wrote: >> John (Stultz), does that sound good to you? The context is that >> Jianyong would like to add a hypercall that returns a (cycles, >> nanoseconds) pair to the guest. On x86 we're relying on the vclock_mode >> field that is already there for the vDSO, but being able to just use >> ktime_get_snapshot would be much nicer. >=20 > I've not really looked at the code closely in awhile, so I'm not sure > my suggestions will be too useful. >=20 > My only instinct is maybe to not include the clocksource pointer in > the system_time_snapshot, as I worry that structure will then be > abused by the interface users. If you're just wanting to make sure > the clocksource is what you're expecting, would instead putting only > the clocksource name in the structure suffice? Well, it would suffice but it would be quite ugly to do a string comparison later. What kind of abuse are you thinking of? We already have struct system_counterval_t for a clocksource+cycles tuple, so it seemed obvious to me to make system_time_snapshot a superset of it... In fact, system_time_snapshot's cycles member is even unused currently, so it could even be easily replaced by a struct system_counterval_t, instead of adding an extra field. Paolo