Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1879355ybl; Wed, 28 Aug 2019 23:43:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzNOuBbCyGLM17yhmtWvpSAGZRCJSAI5eJlJ19Ai6ONGAxzWim4l2orhwdN0iFcy2tGwn7 X-Received: by 2002:a62:c584:: with SMTP id j126mr9385503pfg.21.1567060989564; Wed, 28 Aug 2019 23:43:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567060989; cv=none; d=google.com; s=arc-20160816; b=atwqIiPGZzQpseROcb1DW3Ht19DDjQOASpss92rLXJ4BhY1aulFXpVbqZnL+Sv1Nhz BsC+86urZsO31K3kVZ1S9vR/cGTLfOvZ+Nl4CPBdZ4qMuUX47KSKzN8ue24pGgT3ntBx AQVnhH5Hg56rrS99KH9S4Oj8ViM1hpf+8PkxDNmrSUv5u82NOE3piqqXEz10tcYobGXD EAxW21UbshMMQMTFWlarHaS7535bn2HS2d6pmX3qqe+v4D1Rsx+0QA2oQ5U0imbRkput DLwPUwvDS9RYCQU4aL4Yc7tRGDFM25wVi2C78TWBxDLn5uGhEzytJeSDQbfVp+rYhuSD h9NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=DKsJd+BfDjwipJHaR34evVOIQnW37gBwve9WS35q26U=; b=HTLOuObBTx9wGjVmmjdlvuuUZAOQwQb3z5Fgv2iY2K1BrUKQOZTX3dvvPZRTRFdIeQ Rd6xb0SwflPxkDN0WNqmpBzsNhJBkMeusqNIfbPFpo5yno/UsTgVr73RWiD8yEkmPjDC cQ7pGFdDo8Q+5HULxdPY8LQsiP022lS8faBoDS1YRUKjcALwhpL6diWBiDzmk3/B+4dd SEgPVvkUGgsds0r+ct1CBsiSn9iZOAaotJ+qFWs7InZ6NhnnVZNhlcYhl48jGtKFld1I /idabXOF4HU9SvuhCVtpOq/O7jcG47tYEuJvtPQsD1oGtu0cQxYHeXdmarNCwvzzYiCo gDvA== 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 x2si1163529pgp.475.2019.08.28.23.42.54; Wed, 28 Aug 2019 23:43:09 -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 S1727455AbfH2GkH (ORCPT + 99 others); Thu, 29 Aug 2019 02:40:07 -0400 Received: from foss.arm.com ([217.140.110.172]:39576 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbfH2GkH (ORCPT ); Thu, 29 Aug 2019 02:40:07 -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 7836C28; Wed, 28 Aug 2019 23:40:06 -0700 (PDT) Received: from entos-d05.shanghai.arm.com (entos-d05.shanghai.arm.com [10.169.40.35]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2C1E93F246; Wed, 28 Aug 2019 23:42:25 -0700 (PDT) From: Jianyong Wu To: netdev@vger.kernel.org, pbonzini@redhat.com, sean.j.christopherson@intel.com, maz@kernel.org, richardcochran@gmail.com, Mark.Rutland@arm.com, Will.Deacon@arm.com, suzuki.poulose@arm.com Cc: linux-kernel@vger.kernel.org, Steve.Capper@arm.com, Kaly.Xin@arm.com, justin.he@arm.com, jianyong.wu@arm.com Subject: [RFC PATCH 0/3] arm64: enable virtual kvm ptp for arm64 Date: Thu, 29 Aug 2019 02:39:49 -0400 Message-Id: <20190829063952.18470-1-jianyong.wu@arm.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kvm ptp targets to provide high precision time sync between guest and host in virtualization environment. This patch enable kvm ptp for arm64. This patch set base on [1][2][3] [1]https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/ commit/?h=kvm/hvc&id=125ea89e4a21e2fc5235410f966a996a1a7148bf [2]https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/ commit/?h=kvm/hvc&id=464f5a1741e5959c3e4d2be1966ae0093b4dce06 [3]https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/ commit/?h=kvm/hvc&id=6597490e005d0eeca8ed8c1c1d7b4318ee014681 Jianyong Wu (3): Export psci_ops.conduit symbol as modules will use it. reorganize ptp_kvm modules to make it arch-independent. Enable ptp_kvm for arm64 arch/arm64/include/asm/arch_timer.h | 3 + arch/arm64/kvm/arch_ptp_kvm.c | 76 +++++++++++++++++++++++ arch/x86/kvm/arch_ptp_kvm.c | 92 ++++++++++++++++++++++++++++ drivers/clocksource/arm_arch_timer.c | 6 +- drivers/firmware/psci/psci.c | 6 ++ drivers/ptp/Kconfig | 2 +- drivers/ptp/Makefile | 1 + drivers/ptp/{ptp_kvm.c => kvm_ptp.c} | 77 ++++++----------------- include/asm-generic/ptp_kvm.h | 12 ++++ include/linux/arm-smccc.h | 16 ++++- include/linux/psci.h | 1 + virt/kvm/arm/psci.c | 17 +++++ 12 files changed, 246 insertions(+), 63 deletions(-) create mode 100644 arch/arm64/kvm/arch_ptp_kvm.c create mode 100644 arch/x86/kvm/arch_ptp_kvm.c rename drivers/ptp/{ptp_kvm.c => kvm_ptp.c} (63%) create mode 100644 include/asm-generic/ptp_kvm.h -- 2.17.1