From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Estrada, Zachary J" Subject: Injecting a page fault into the guest OS? Date: Thu, 5 Feb 2015 17:02:03 -0600 Message-ID: <54D3F66B.3000205@illinois.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit To: Return-path: Received: from pps-master.cites.illinois.edu ([192.17.82.68]:52971 "EHLO pps-master.cites.illinois.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752156AbbBEXXx (ORCPT ); Thu, 5 Feb 2015 18:23:53 -0500 Received: from pps.reinject (pps-master.cites.illinois.edu [127.0.0.1]) by pps-master.cites.illinois.edu (8.14.5/8.14.5) with ESMTP id t15NHufg031070 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 5 Feb 2015 17:17:57 -0600 Received: from pps.reinject (pps-master.cites.illinois.edu [127.0.0.1]) by pps.reinject (8.14.5/8.14.5) with SMTP id t15NHqru030993 for ; Thu, 5 Feb 2015 17:17:56 -0600 Received: from citesht1.cites.illinois.edu (citesht1.cites.illinois.edu [128.174.34.206]) by pps01.cites.illinois.edu with ESMTP id t15N24mt010948 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Thu, 05 Feb 2015 17:02:04 -0600 Sender: kvm-owner@vger.kernel.org List-ID: 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