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 23:58:06 +0300 Message-ID: <4A107A5E.5010403@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> <4A106C90.2060106@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; 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]:42965 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754020AbZEQU6L (ORCPT ); Sun, 17 May 2009 16:58:11 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Alexander Graf wrote: >> >> 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 remember it was something about accessing the apic with npt. Maybe > the real problem was the restricted bit checking that made the > emulated instruction behave differently from the real mmu. The apic should not be mapped by Hyper-V's shadow page tables, so this should have been handled by page_fault(). -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.