kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Estrada, Zachary J" <zestrad2@illinois.edu>
To: <kvm@vger.kernel.org>
Subject: Injecting a page fault into the guest OS?
Date: Thu, 5 Feb 2015 17:02:03 -0600	[thread overview]
Message-ID: <54D3F66B.3000205@illinois.edu> (raw)

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

                 reply	other threads:[~2015-02-05 23:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54D3F66B.3000205@illinois.edu \
    --to=zestrad2@illinois.edu \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).