Re: [PATCH 1/2] LoongArch: KVM: Fix PC double advance in kernel MMIO read fast path

From: Huacai Chen

Date: Sun Aug 02 2026 - 08:01:19 EST


On Sat, Jul 25, 2026 at 11:38 AM Tao Cui <cui.tao@xxxxxxxxx> wrote:
>
> From: Tao Cui <cuitao@xxxxxxxxxx>
>
> > In the in-kernel MMIO read fast path of kvm_emu_mmio_read(),
> > kvm_complete_mmio_read() already advances the guest PC via update_pc().
> > The explicit update_pc() call right after it advances the PC a second
> > time, so PC moves forward by 8 instead of 4 and the instruction
> > following the MMIO read is silently skipped.
>
> Good catch!
> Reviewed-by: Tao Cui <cuitao@xxxxxxxxxx>
Applied, thanks.

Huacai