lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <70bdbe9c25214e9483950a0a0efb4305@huawei.com>
Date:   Wed, 16 Dec 2020 08:01:37 +0000
From:   Jiangyifei <jiangyifei@...wei.com>
To:     Anup Patel <anup@...infault.org>
CC:     Anup Patel <anup.patel@....com>, Atish Patra <atish.patra@....com>,
        "Paul Walmsley" <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Zhanghailiang <zhang.zhanghailiang@...wei.com>,
        KVM General <kvm@...r.kernel.org>,
        yinyipeng <yinyipeng1@...wei.com>,
        "Zhangxiaofeng (F)" <victor.zhangxiaofeng@...wei.com>,
        "linux-kernel@...r.kernel.org List" <linux-kernel@...r.kernel.org>,
        "kvm-riscv@...ts.infradead.org" <kvm-riscv@...ts.infradead.org>,
        linux-riscv <linux-riscv@...ts.infradead.org>,
        "Wubin (H)" <wu.wubin@...wei.com>,
        "dengkai (A)" <dengkai1@...wei.com>
Subject: RE: [PATCH RFC 0/3] Implement guest time scaling in RISC-V KVM


> -----Original Message-----
> From: Anup Patel [mailto:anup@...infault.org]
> Sent: Wednesday, December 16, 2020 2:40 PM
> To: Jiangyifei <jiangyifei@...wei.com>
> Cc: Anup Patel <anup.patel@....com>; Atish Patra <atish.patra@....com>;
> Paul Walmsley <paul.walmsley@...ive.com>; Palmer Dabbelt
> <palmer@...belt.com>; Albert Ou <aou@...s.berkeley.edu>; Paolo Bonzini
> <pbonzini@...hat.com>; Zhanghailiang <zhang.zhanghailiang@...wei.com>;
> KVM General <kvm@...r.kernel.org>; yinyipeng <yinyipeng1@...wei.com>;
> Zhangxiaofeng (F) <victor.zhangxiaofeng@...wei.com>;
> linux-kernel@...r.kernel.org List <linux-kernel@...r.kernel.org>;
> kvm-riscv@...ts.infradead.org; linux-riscv <linux-riscv@...ts.infradead.org>;
> Wubin (H) <wu.wubin@...wei.com>; dengkai (A) <dengkai1@...wei.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@...wei.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@...ts.infradead.org
> > http://lists.infradead.org/mailman/listinfo/kvm-riscv

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ