linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] Implement guest time scaling in RISC-V KVM
@ 2020-12-03 12:18 Yifei Jiang
  2020-12-03 12:18 ` [PATCH RFC 1/3] RISC-V: KVM: Change the method of calculating cycles to nanoseconds Yifei Jiang
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Yifei Jiang @ 2020-12-03 12:18 UTC (permalink / raw)
  To: anup.patel, atish.patra, paul.walmsley, palmer, aou, pbonzini
  Cc: kvm-riscv, kvm, linux-riscv, linux-kernel, victor.zhangxiaofeng,
	wu.wubin, zhang.zhanghailiang, dengkai1, yinyipeng1, Yifei Jiang

This series implements guest time scaling based on RDTIME instruction
emulation so that we can allow migrating Guest/VM across Hosts with
different time frequency.

Why not through para-virt. From arm's experience[1], para-virt implementation
doesn't really solve the problem for the following two main reasons:
- RDTIME not only be used in linux, but also in firmware and userspace.
- It is difficult to be compatible with nested virtualization.

[1] https://lore.kernel.org/patchwork/cover/1288153/

Yifei Jiang (3):
  RISC-V: KVM: Change the method of calculating cycles to nanoseconds
  RISC-V: KVM: Support dynamic time frequency from userspace
  RISC-V: KVM: Implement guest time scaling

 arch/riscv/include/asm/csr.h            |  3 ++
 arch/riscv/include/asm/kvm_vcpu_timer.h | 13 +++++--
 arch/riscv/kvm/vcpu_exit.c              | 35 +++++++++++++++++
 arch/riscv/kvm/vcpu_timer.c             | 51 ++++++++++++++++++++++---
 4 files changed, 93 insertions(+), 9 deletions(-)

-- 
2.19.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-16  8:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 12:18 [PATCH RFC 0/3] Implement guest time scaling in RISC-V KVM Yifei Jiang
2020-12-03 12:18 ` [PATCH RFC 1/3] RISC-V: KVM: Change the method of calculating cycles to nanoseconds Yifei Jiang
2020-12-03 12:18 ` [PATCH RFC 2/3] RISC-V: KVM: Support dynamic time frequency from userspace Yifei Jiang
2020-12-03 12:18 ` [PATCH RFC 3/3] RISC-V: KVM: Implement guest time scaling Yifei Jiang
2020-12-16  6:39 ` [PATCH RFC 0/3] Implement guest time scaling in RISC-V KVM Anup Patel
2020-12-16  8:01   ` Jiangyifei

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).