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

Huacai Chen <[email protected]> Sun, 2 Aug 2026 20:00:53 +0800
Newsgroups dev.linux.lists.loongarch,org.kernel.vger.kvm,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <CAAhV-H6SfckPJkB=ZcXT5w_6mpkf8kZyaMHes64Ep_56atvPLA@mail.gmail.com>
On Sat, Jul 25, 2026 at 11:38=E2=80=AFAM Tao Cui <[email protected]> wrote:
>
> From: Tao Cui <[email protected]>
>
> > 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 <[email protected]>
Applied, thanks.

Huacai