Re: [syzbot] [kvm?] WARNING in kvm_vcpu_pre_fault_memory
From: Edgecombe, Rick P
Date: Mon Oct 05 2026 - 18:32:53 EST
On Sun, 2026-10-04 at 20:52 -0700, Sean Christopherson wrote:
> I haven't tried the reproducer yet, but based on code inspection I'm pretty sure
> the kvm_vm_dead() call in enter_smm() is colliding with commit 958810a09412d
> ("KVM: x86/mmu: Bail out kvm_tdp_map_page() when VM dead"), especialy since there
> is SMM setup in the reproducer.
>
> I'm think we can and should just drop EIO from the WARN. It showed up in v5 of
> the original series without any real explanation. v5 did add -EIO as a documented
> error code[1]:
>
> v4->v5:
> - add EIO as possible error
>
> in response to Xiaoyao's review[2]:
>
> > + case RET_PF_CONTINUE:
> > + case RET_PF_INVALID:
> > + default:
> > + WARN_ON_ONCE(r);
> > + return -EIO;
>
> Need to update patch 1 for -EIO
>
> > + }
>
>
> but AFAICT that was just talking about the documentation.
>
Yea I think he was just saying to update the docs. The EIO in the switch
statement in kvm_tdp_page_prefault() seems to stretch back to the original
versions of this.
> And at the time, KVM
> x86 already WARNed when returning -EIO, so I've no idea common KVM also WARNed
> on seeing -EIO.
I also couldn't find a reason for the addition of the common KVM EIO warn in v5.
Removing it does look like an appropriate fix.
>
> [1] https://lore.kernel.org/all/20240710174031.312055-1-pbonzini@xxxxxxxxxx
> [2] https://lore.kernel.org/all/d5a6e125-bff4-4d82-ae65-b99d9cb10e90@xxxxxxxxx