Skip to content

KVM: arm64: Add host/guest KVM-PTP support

Marc Zyngier kvm kvmarm linux-arm-kernel lkml netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v19 Latest7 patches 17 repliesIn review
  2. v187 patches 5 repliesSuperseded
  3. v177 patches 5 repliesSuperseded

Patches in v19 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7arm/arm64: Probe for the presence of KVM hypervisorarch/arm/include/asm/hypervisor.h arch/arm64/include/asm/hypervisor.h drivers/firmware/psci/psci.c +4 more+85 -11 reply
2/7KVM: arm64: Advertise KVM UID to guests via SMCCCarch/arm64/kvm/hypercalls.c+18 -90 replies
3/7ptp: Reorganize ptp_kvm.c to make it arch-independentdrivers/ptp/Makefile drivers/ptp/ptp_kvm_common.c drivers/ptp/ptp_kvm_x86.c +1 more+139 -623 replies
4/7time: Add mechanism to recognize clocksource in time_get_snapshotinclude/linux/clocksource.h include/linux/clocksource_ids.h include/linux/timekeeping.h +2 more+27 -51 reply
5/7clocksource: Add clocksource id for arm arch counterdrivers/clocksource/arm_arch_timer.c include/linux/clocksource_ids.h+3 -00 replies
6/7KVM: arm64: Add support for the KVM PTP serviceDocumentation/virt/kvm/api.rst Documentation/virt/kvm/arm/index.rst Documentation/virt/kvm/arm/ptp_kvm.rst +4 more+107 -03 replies
7/7ptp: arm/arm64: Enable ptp_kvm for arm/arm64drivers/clocksource/arm_arch_timer.c drivers/ptp/Kconfig drivers/ptp/Makefile +1 more+64 -19 replies

Reviews trailers per patch

3 of 7 patches have a Reviewed-by or Acked-by.

PatchSteven PriceAndre PrzywaraRichard Cochran
1/7R-b
2/7
3/7R-b A-b
4/7
5/7R-b
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v19 thread

Cover letter [PATCH v19 0/7] KVM: arm64: Add host/guest KVM-PTP support

Given that this series[0] has languished in my Inbox for the best of the past two years, and in an effort to eventually get it merged, I've taken the liberty to pick it up and do the changes I wanted to see instead of waiting to go through yet another round.

All the patches have a link to their original counterpart (though I have squashed a couple of them where it made sense). Tested both 64 and 32bit guests for a good measure. Of course, I claim full responsibility for any bug introduced here.

Unless someone screams now, this is going in 5.13, because I'm frankly fed up with it! ;-)

* From v18 [2]
- Fix kvm_hypercall2() return type
- Rebased on top of 5.12-rc3
- Added RBs

* From v17 [1]:
- Fixed compilation issue on 32bit systems not selecting CONFIG_HAVE_ARM_SMCCC_DISCOVERY
- Fixed KVM service discovery not properly parsing the reply from the hypervisor

* From v16 [0]:
- Moved the KVM service discovery to its own file, plugged it into PSCI instead of the arch code, dropped the inlining, made use of asm/hypervisor.h.
- Tidied-up the namespacing
- Cleanup the hypercall handler
- De-duplicate the guest code
- Tidied-up arm64-specific documentation
- Dropped the generic PTP documentation as it needs a new location, and some cleanup
- Squashed hypercall documentation and capability into the main KVM patch
- Rebased on top of 5.11-rc4

[0] https://lore.kernel.org/r/[email protected]
[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected]

Jianyong Wu (4):
ptp: Reorganize ptp_kvm.c to make it arch-independent
clocksource: Add clocksource id for arm arch counter
KVM: arm64: Add support for the KVM PTP service
ptp: arm/arm64: Enable ptp_kvm for arm/arm64

Thomas Gleixner (1):
time: Add mechanism to recognize clocksource in time_get_snapshot

Will Deacon (2):
arm/arm64: Probe for the presence of KVM hypervisor
KVM: arm64: Advertise KVM UID to guests via SMCCC

 Documentation/virt/kvm/api.rst              | 10 +++
 Documentation/virt/kvm/arm/index.rst        |  1 +
 Documentation/virt/kvm/arm/ptp_kvm.rst      | 25 ++++++
 arch/arm/include/asm/hypervisor.h           |  3 +
 arch/arm64/include/asm/hypervisor.h         |  3 +
 arch/arm64/kvm/arm.c                        |  1 +
 arch/arm64/kvm/hypercalls.c                 | 80 +++++++++++++++--
 drivers/clocksource/arm_arch_timer.c        | 36 ++++++++
 drivers/firmware/psci/psci.c                |  2 +
 drivers/firmware/smccc/Makefile             |  2 +-
 drivers/firmware/smccc/kvm_guest.c          | 50 +++++++++++
 drivers/firmware/smccc/smccc.c              |  1 +
 drivers/ptp/Kconfig                         |  2 +-
 drivers/ptp/Makefile                        |  2 +
 drivers/ptp/ptp_kvm_arm.c                   | 28 ++++++
 drivers/ptp/{ptp_kvm.c => ptp_kvm_common.c} | 84 +++++-------------
 drivers/ptp/ptp_kvm_x86.c                   | 97 +++++++++++++++++++++
 include/linux/arm-smccc.h                   | 41 +++++++++
 include/linux/clocksource.h                 |  6 ++
 include/linux/clocksource_ids.h             | 12 +++
 include/linux/ptp_kvm.h                     | 19 ++++
 include/linux/timekeeping.h                 | 12 +--
 include/uapi/linux/kvm.h                    |  1 +
 kernel/time/clocksource.c                   |  2 +
 kernel/time/timekeeping.c                   |  1 +
 25 files changed, 443 insertions(+), 78 deletions(-)
 create mode 100644 Documentation/virt/kvm/arm/ptp_kvm.rst
 create mode 100644 drivers/firmware/smccc/kvm_guest.c
 create mode 100644 drivers/ptp/ptp_kvm_arm.c
 rename drivers/ptp/{ptp_kvm.c => ptp_kvm_common.c} (60%)
 create mode 100644 drivers/ptp/ptp_kvm_x86.c
 create mode 100644 include/linux/clocksource_ids.h
 create mode 100644 include/linux/ptp_kvm.h
Signature · 6 lines
2.29.2

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm