Re: [PATCH v2] KVM: arm64: timers: Convert per-vcpu virtual offset to a global value

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

 



On Tue, 28 Feb 2023 11:26:07 +0000,
Joey Gouly <joey.gouly@xxxxxxx> wrote:
> 
> Hi Marc,
> 
> On Fri, Feb 24, 2023 at 07:16:40PM +0000, Marc Zyngier wrote:
> > Having a per-vcpu virtual offset is a pain. It needs to be synchronized
> > on each update, and expands badly to a setup where different timers can
> > have different offsets, or have composite offsets (as with NV).
> > 
> > So let's start by replacing the use of the CNTVOFF_EL2 shadow register
> > (which we want to reclaim for NV anyway), and make the virtual timer
> > carry a pointer to a VM-wide offset.
> > 
> > This simplifies the code significantly. It also addresses two terrible bugs:
> > 
> > - The use of CNTVOFF_EL2 leads to some nice offset corruption
> >   when the sysreg gets reset, as reported by Joey.
> > 
> > - The kvm mutex is taken from a vcpu ioctl, which goes against
> >   the locking rules...
> > 
> > Reported-by: Joey Gouly <joey.gouly@xxxxxxx>
> > Reviewed-by: Reiji Watanabe <reijiw@xxxxxxxxxx>
> > Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
> > Link: https://lore.kernel.org/r/20230224173915.GA17407@xxxxxxxxxxxxxxxxxxxxxxxxx
> 
> Fixes my mismatched timer offset issues.
> 
> Tested-by: Joey Gouly <joey.gouly@xxxxxxx>

Thanks for having given it a go. Hopefully Oliver will be able to send
this to as a fix shortly.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.



[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