linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Steven Price <steven.price@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Christoffer Dall <christoffer.dall@arm.com>,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 00/12] arm64: Paravirtualized time support
Date: Mon, 10 Dec 2018 11:40:47 +0000	[thread overview]
Message-ID: <20181210114047.tifwh6ilwzphsbqy@lakrids.cambridge.arm.com> (raw)
In-Reply-To: <20181128144527.44710-1-steven.price@arm.com>

On Wed, Nov 28, 2018 at 02:45:15PM +0000, Steven Price wrote:
> 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.

I know that stolen time reporting is important, and I think that we
definitely want to pick up that part of the spec (once it is published
in some non-draft form).

However, I am very concerned with the pv-freq part of LPT, and I'd like
to avoid that if at all possible. I say that because:

* By design, it breaks architectural guarantees from the PoV of SW in
  the guest.

  A VM may host multiple SW agents serially (e.g. when booting, or
  across kexec), or concurrently (e.g. Linux w/ EFI runtime services),
  and the host has no way to tell whether all software in the guest will
  function correctly. Due to this, it's not possible to have a guest
  opt-in to the architecturally-broken timekeeping.

  Existing guests will not work correctly once pv-freq is in use, and if
  configured without pv-freq (or if the guest fails to discover pv-freq
  for any reason), the administrator may encounter anything between
  subtle breakage or fatally incorrect timekeeping.

  There's plenty of SW agents other than Linux which runs in a guest,
  which would need to be updated to handle pv-freq, e.g. GRUB, *BSD,
  iPXE.

  Given this, I think that this is going to lead to subtle breakage in
  real-world scenarios. 

* It is (necessarily) invasive to the low-level arch timer code. This is
  unfortunate, and I strongly suspect this is going to be an area with
  long-term subtle breakage.

* It's not clear to me how strongly people need this. My understanding
  is that datacenters would run largely homogeneous platforms. I suspect
  large datacenters which would use migration are in a position to
  mandate a standard timer frequency from their OEMs or SiPs.

  I strongly believe that an architectural fix (e.g. in-hw scaling)
  would be the better solution.

I understand that LPT is supposed to account for time lost during the
migration. Can we account for this without pv-freq? e.g. is it possible
to account for this in the same way as stolen time?

Thanks,
Mark.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2018-12-10 11:41 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28 14:45 [PATCH 00/12] arm64: Paravirtualized time support Steven Price
2018-11-28 14:45 ` [PATCH 01/12] KVM: arm64: Document PV-time interface Steven Price
2018-12-03 13:50   ` Andrew Jones
2018-12-03 14:18     ` Marc Zyngier
2018-12-03 15:16       ` Andrew Jones
2018-12-03 15:23         ` Marc Zyngier
2018-12-03 15:52           ` Andrew Jones
2018-12-05 12:32     ` Steven Price
2018-11-28 14:45 ` [PATCH 02/12] KVM: arm/arm64: Factor out hypercall handling from PSCI code Steven Price
2018-12-03 16:02   ` Andrew Jones
2018-11-28 14:45 ` [PATCH 03/12] arm/arm64: Provide a wrapper for SMCCC 1.1 calls Steven Price
2018-12-10 10:27   ` Mark Rutland
2018-12-10 13:52     ` Steven Price
2018-11-28 14:45 ` [PATCH 04/12] arm/arm64: Make use of the SMCCC 1.1 wrapper Steven Price
2018-11-28 14:45 ` [PATCH 05/12] KVM: arm64: Implement PV_FEATURES call Steven Price
2018-12-10 10:39   ` Mark Rutland
2018-12-10 14:20     ` Steven Price
2018-11-28 14:45 ` [PATCH 06/12] KVM: arm64: Support Live Physical Time reporting Steven Price
2018-12-10 10:56   ` Mark Rutland
2018-12-10 15:45     ` Steven Price
2018-11-28 14:45 ` [PATCH 07/12] clocksource: arm_arch_timer: Use paravirtualized LPT Steven Price
2018-11-28 14:45 ` [PATCH 08/12] KVM: Export mark_page_dirty_in_slot Steven Price
2018-11-28 14:45 ` [PATCH 09/12] KVM: arm64: Support stolen time reporting via shared page Steven Price
2018-11-28 14:45 ` [PATCH 10/12] arm64: Retrieve stolen time as paravirtualized guest Steven Price
2018-11-28 14:45 ` [PATCH 11/12] KVM: Allow kvm_device_ops to be const Steven Price
2018-11-28 14:45 ` [PATCH 12/12] KVM: arm64: Provide a PV_TIME device to user space Steven Price
2018-12-03 13:25 ` [PATCH 00/12] arm64: Paravirtualized time support Andrew Jones
2018-12-03 14:36   ` Marc Zyngier
2018-12-05 12:30   ` Steven Price
2018-12-10 11:40 ` Mark Rutland [this message]
2018-12-10 16:08   ` Steven Price
2019-01-08 10:36   ` Christoffer Dall

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=20181210114047.tifwh6ilwzphsbqy@lakrids.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=christoffer.dall@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=marc.zyngier@arm.com \
    --cc=steven.price@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).