From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 3/6] Emulator: Inject #PF when page was not found Date: Sun, 17 May 2009 22:59:12 +0300 Message-ID: <4A106C90.2060106@redhat.com> References: <1242375740-31222-1-git-send-email-agraf@suse.de> <1242375740-31222-2-git-send-email-agraf@suse.de> <1242375740-31222-3-git-send-email-agraf@suse.de> <1242375740-31222-4-git-send-email-agraf@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, joerg.roedel@amd.com To: Alexander Graf Return-path: Received: from mx2.redhat.com ([66.187.237.31]:45757 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753762AbZEQT7R (ORCPT ); Sun, 17 May 2009 15:59:17 -0400 In-Reply-To: <1242375740-31222-4-git-send-email-agraf@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: Alexander Graf wrote: > If we couldn't find a page on read_emulated, it might be a good > idea to tell the guest about that and inject a #PF. > > We do the same already for write faults. I don't know why it was > not implemented for reads. > > I can't think why it was done for writes. Normally, a guest page fault would be trapped and reflected a long time before emulation, in FNAME(page_fault)(), after walk_addr(). Can you give some details on the situation? What instruction was executed, and why kvm tried to emulate it? (I guess it depends on the relative priority of svm instruction intercepts and the page fault intercept?) -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.