From: Jiangyifei <jiangyifei@huawei.com>
To: Anup Patel <anup@brainfault.org>
Cc: "kvm-riscv@lists.infradead.org" <kvm-riscv@lists.infradead.org>,
Albert Ou <aou@eecs.berkeley.edu>,
Zhanghailiang <zhang.zhanghailiang@huawei.com>,
KVM General <kvm@vger.kernel.org>,
Anup Patel <anup.patel@wdc.com>,
"linux-kernel@vger.kernel.org List"
<linux-kernel@vger.kernel.org>, Atish Patra <atish.patra@wdc.com>,
"Zhangxiaofeng \(F\)" <victor.zhangxiaofeng@huawei.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
yinyipeng <yinyipeng1@huawei.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Paolo Bonzini <pbonzini@redhat.com>,
linux-riscv <linux-riscv@lists.infradead.org>,
"Wubin \(H\)" <wu.wubin@huawei.com>,
"dengkai \(A\)" <dengkai1@huawei.com>
Subject: RE: [PATCH RFC 0/3] Implement guest time scaling in RISC-V KVM
Date: Wed, 16 Dec 2020 08:01:37 +0000 [thread overview]
Message-ID: <70bdbe9c25214e9483950a0a0efb4305@huawei.com> (raw)
In-Reply-To: <CAAhSdy2zdwfOGFUtakhbeDUJBapz6fWPnQptT7nCdyFMSoLyGg@mail.gmail.com>
> -----Original Message-----
> From: Anup Patel [mailto:anup@brainfault.org]
> Sent: Wednesday, December 16, 2020 2:40 PM
> To: Jiangyifei <jiangyifei@huawei.com>
> Cc: Anup Patel <anup.patel@wdc.com>; Atish Patra <atish.patra@wdc.com>;
> Paul Walmsley <paul.walmsley@sifive.com>; Palmer Dabbelt
> <palmer@dabbelt.com>; Albert Ou <aou@eecs.berkeley.edu>; Paolo Bonzini
> <pbonzini@redhat.com>; Zhanghailiang <zhang.zhanghailiang@huawei.com>;
> KVM General <kvm@vger.kernel.org>; yinyipeng <yinyipeng1@huawei.com>;
> Zhangxiaofeng (F) <victor.zhangxiaofeng@huawei.com>;
> linux-kernel@vger.kernel.org List <linux-kernel@vger.kernel.org>;
> kvm-riscv@lists.infradead.org; linux-riscv <linux-riscv@lists.infradead.org>;
> Wubin (H) <wu.wubin@huawei.com>; dengkai (A) <dengkai1@huawei.com>
> Subject: Re: [PATCH RFC 0/3] Implement guest time scaling in RISC-V KVM
>
> On Thu, Dec 3, 2020 at 5:51 PM Yifei Jiang <jiangyifei@huawei.com> wrote:
> >
> > 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.
>
> I think this approach is rather incomplete. Also, I don't see how para-virt time
> scaling will be difficult for nested virtualization.
>
> If trap-n-emulate TIME CSR for Guest Linux then it will have significant
> performance impact of systems where TIME CSR is implemented in HW.
>
> Best approach will be to have VDSO-style para-virt time-scale SBI calls (similar
> to what KVM x86 does). If the Guest software (Linux/Bootloader) does not
> enable para-virt time-scaling then we trap-n-emulate TIME CSR (this series).
>
> Please propose VDSO-style para-virt time-scale SBI call and expand this this
> series to provide both:
> 1. VDSO-style para-virt time-scaling
> 2. Trap-n-emulation of TIME CSR when #1 is disabled
>
> Regards,
> Anup
>
OK, it sounds good. We will look into the para-virt time-scaling for more details.
Yifei
> >
> > [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
> >
> >
> > --
> > kvm-riscv mailing list
> > kvm-riscv@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/kvm-riscv
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2020-12-16 8:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=70bdbe9c25214e9483950a0a0efb4305@huawei.com \
--to=jiangyifei@huawei.com \
--cc=anup.patel@wdc.com \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=atish.patra@wdc.com \
--cc=dengkai1@huawei.com \
--cc=kvm-riscv@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=pbonzini@redhat.com \
--cc=victor.zhangxiaofeng@huawei.com \
--cc=wu.wubin@huawei.com \
--cc=yinyipeng1@huawei.com \
--cc=zhang.zhanghailiang@huawei.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