Injecting a page fault into the guest OS?
Hi all,
I'm trying to inject a page fault into a Linux guest, but when tracing the guest OS I don't see the injected fault making it to do_page_fault in the guest. That is, I don't see a do_page_fault call with a CR2 matching the address I'm passing.
I'm currently calling the kvm_inject_page_fault(vcpu, &exception) function from
a custom kernel module. I have a simple callback at the top of vmx_vcpu_run that invokes my module before the asm for vmlaunch/resume. I have tried with various permutations of exception.error_code, but haven't found anything that works. Is there something else I need to do? My system does not have tdp, but I am looking for something that's agnostic of the underlying virtual mmu.
Thanks!
--Zak