Re: [External] Re: [PATCH v2] RISC-V: KVM: Delegate kvm unhandled faults to VS mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 11, 2025 at 2:16 PM Radim Krčmář <rkrcmar@xxxxxxxxxxxxxxxx> wrote:
>
> 2025-07-10T21:30:30+08:00, Xu Lu <luxu.kernel@xxxxxxxxxxxxx>:
> > Delegate faults which are not handled by kvm to VS mode to avoid
> > unnecessary traps to HS mode. These faults include illegal instruction
> > fault, instruction access fault, load access fault and store access
> > fault.
> >
> > The delegation of illegal instruction fault is particularly important
> > to guest applications that use vector instructions frequently. In such
> > cases, an illegal instruction fault will be raised when guest user thread
> > uses vector instruction the first time and then guest kernel will enable
> > user thread to execute following vector instructions.
>
> (This optimization will be even more significant when nesting, where it
>  would currently go -> HS0 -> HS1 -> HS0 -> VS1, instead of -> VS1.)

Nice supplement! Thanks.

>
> > The fw pmu event counters remain undeleted so that guest can still get
> > these events via sbi call. Guest will only see zero count on these
> > events and know 'firmware' has delegated these faults.
> >
> > Signed-off-by: Xu Lu <luxu.kernel@xxxxxxxxxxxxx>
> > ---
>
> Reviewed-by: Radim Krčmář <rkrcmar@xxxxxxxxxxxxxxxx>





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux