On Thu, Sep 21, 2023, isaku.yamahata@xxxxxxxxx wrote: > + if (!pfn_valid(pfn)) > + return -ENXIO; > + return memory_failure(pfn, MF_SW_SIMULATED); memory_failure is defined iff CONFIG_MEMORY_FAILURE=y. All of this code would need to be conditioned on that (in addition to the injection configs). address_space_operations.error_remove_page() arguably should be conditioned on that as well, but that's a much bigger change and not a problem that needs to be solved anytime soon.