kvmarm.lists.cs.columbia.edu archive mirror
 help / color / mirror / Atom feed
From: Steven Price <steven.price@arm.com>
To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org
Cc: Marc Zyngier <marc.zyngier@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Steven Price <steven.price@arm.com>
Subject: [RFC PATCH v2 00/12] arm64: Paravirtualized time support
Date: Wed, 12 Dec 2018 15:02:14 +0000	[thread overview]
Message-ID: <20181212150226.38051-1-steven.price@arm.com> (raw)

This series add support for paravirtualized time for Arm64 guests and
KVM hosts following the specification in Arm's document DEN 0057A:

https://developer.arm.com/docs/den0057/a

It implements support for Live Physical Time (LPT) which provides the
guest with a method to derive a stable counter of time during which the
guest is executing even when the guest is being migrated between hosts
with different physical counter frequencies.

It also implements support for stolen time, allowing the guest to
identify time when it is forcibly not executing.

Patch 1 provides some documentation
Patches 2-4 and 8 provide some refactoring of existing code
Patches 5-7 and 9 implement cmmon code and support for stolen time
Patches 10-12 implement Live Physical Time

Changes since v1:
 * Live physical time changes split up and moved to the last three patches
   of the series.
 * Renamed arm_smccc_1_1 to arm_smccc_1_1_call to match Mark Rutland's series
   tidying SMCCC up. Potentially these changes can be dropped in favour of
   Mark's series.
 * Renamed things to avoid use of "page" as the shared structures are not
   necessarily an entire/single page.
 * Moved the contents of include/kvm/arm_pv.h to include/linux/arm-smccc.h
 * Fix definition of GPA_INVALID to be sign-extension safe

Christoffer Dall (1):
  KVM: arm/arm64: Factor out hypercall handling from PSCI code

Steven Price (11):
  KVM: arm64: Document PV-time interface
  arm/arm64: Provide a wrapper for SMCCC 1.1 calls
  arm/arm64: Make use of the SMCCC 1.1 wrapper
  KVM: arm64: Implement PV_FEATURES call
  KVM: arm64: Support stolen time reporting via shared structure
  arm64: Retrieve stolen time as paravirtualized guest
  KVM: Allow kvm_device_ops to be const
  KVM: arm64: Provide a PV_TIME device to user space
  KVM: arm64: Support Live Physical Time reporting
  clocksource: arm_arch_timer: Use paravirtualized LPT
  KVM: arm64: Export LPT using PV_TIME device

 Documentation/virtual/kvm/arm/pvtime.txt | 169 ++++++++++++++
 arch/arm/kvm/Makefile                    |   2 +-
 arch/arm/kvm/handle_exit.c               |   2 +-
 arch/arm/mm/proc-v7-bugs.c               |  46 ++--
 arch/arm64/include/asm/arch_timer.h      |  32 ++-
 arch/arm64/include/asm/kvm_host.h        |  16 ++
 arch/arm64/include/asm/kvm_mmu.h         |   2 +
 arch/arm64/include/asm/pvclock-abi.h     |  32 +++
 arch/arm64/include/uapi/asm/kvm.h        |   8 +
 arch/arm64/kernel/Makefile               |   1 +
 arch/arm64/kernel/cpu_errata.c           |  47 +---
 arch/arm64/kernel/cpuinfo.c              |   2 +-
 arch/arm64/kernel/kvm.c                  | 156 +++++++++++++
 arch/arm64/kvm/Kconfig                   |   1 +
 arch/arm64/kvm/Makefile                  |   2 +
 arch/arm64/kvm/handle_exit.c             |   4 +-
 drivers/clocksource/arm_arch_timer.c     | 177 ++++++++++++++-
 include/kvm/arm_arch_timer.h             |   2 +
 include/kvm/arm_hypercalls.h             |  44 ++++
 include/kvm/arm_psci.h                   |   2 +-
 include/linux/arm-smccc.h                |  64 ++++++
 include/linux/cpuhotplug.h               |   1 +
 include/linux/kvm_host.h                 |   4 +-
 include/linux/kvm_types.h                |   2 +
 include/uapi/linux/kvm.h                 |   2 +
 virt/kvm/arm/arm.c                       |  25 ++-
 virt/kvm/arm/hypercalls.c                | 271 +++++++++++++++++++++++
 virt/kvm/arm/mmu.c                       |  44 ++++
 virt/kvm/arm/psci.c                      |  76 +------
 virt/kvm/arm/pvtime.c                    | 244 ++++++++++++++++++++
 virt/kvm/kvm_main.c                      |   6 +-
 31 files changed, 1333 insertions(+), 153 deletions(-)
 create mode 100644 Documentation/virtual/kvm/arm/pvtime.txt
 create mode 100644 arch/arm64/include/asm/pvclock-abi.h
 create mode 100644 arch/arm64/kernel/kvm.c
 create mode 100644 include/kvm/arm_hypercalls.h
 create mode 100644 virt/kvm/arm/hypercalls.c
 create mode 100644 virt/kvm/arm/pvtime.c

-- 
2.19.2

             reply	other threads:[~2018-12-12 15:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-12 15:02 Steven Price [this message]
2018-12-12 15:02 ` [RFC PATCH v2 01/12] KVM: arm64: Document PV-time interface Steven Price
2018-12-12 15:02 ` [RFC PATCH v2 02/12] KVM: arm/arm64: Factor out hypercall handling from PSCI code Steven Price
2018-12-12 15:02 ` [RFC PATCH v2 03/12] arm/arm64: Provide a wrapper for SMCCC 1.1 calls Steven Price
2018-12-12 15:02 ` [RFC PATCH v2 04/12] arm/arm64: Make use of the SMCCC 1.1 wrapper Steven Price
2018-12-12 15:02 ` [RFC PATCH v2 05/12] KVM: arm64: Implement PV_FEATURES call Steven Price
2018-12-12 15:02 ` [RFC PATCH v2 06/12] KVM: arm64: Support stolen time reporting via shared structure Steven Price
2018-12-12 15:02 ` [RFC PATCH v2 07/12] arm64: Retrieve stolen time as paravirtualized guest Steven Price
2018-12-12 15:02 ` [RFC PATCH v2 08/12] KVM: Allow kvm_device_ops to be const Steven Price
2018-12-12 15:02 ` [RFC PATCH v2 09/12] KVM: arm64: Provide a PV_TIME device to user space Steven Price
2018-12-12 15:02 ` [RFC PATCH v2 10/12] KVM: arm64: Support Live Physical Time reporting Steven Price
2018-12-12 15:02 ` [RFC PATCH v2 11/12] clocksource: arm_arch_timer: Use paravirtualized LPT Steven Price
2018-12-12 15:02 ` [RFC PATCH v2 12/12] KVM: arm64: Export LPT using PV_TIME device Steven Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181212150226.38051-1-steven.price@arm.com \
    --to=steven.price@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=marc.zyngier@arm.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).