From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH] KVM: fix async page fault working for readonly mapping Date: Mon, 21 May 2012 16:15:50 +0800 Message-ID: <4FB9F9B6.50101@linux.vnet.ibm.com> References: <4FB9E499.2010505@linux.vnet.ibm.com> <20120521080856.GS10209@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , LKML , KVM To: Gleb Natapov Return-path: Received: from e28smtp09.in.ibm.com ([122.248.162.9]:60130 "EHLO e28smtp09.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756714Ab2EUIc6 (ORCPT ); Mon, 21 May 2012 04:32:58 -0400 Received: from /spool/local by e28smtp09.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 21 May 2012 13:47:40 +0530 In-Reply-To: <20120521080856.GS10209@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/21/2012 04:08 PM, Gleb Natapov wrote: > On Mon, May 21, 2012 at 02:45:45PM +0800, Xiao Guangrong wrote: >> If we map a readonly memory space from host to guest and the page is >> not currently mapped in the host, we will get a fault-pfn and async >> is not allowed, then the vm will crash >> > Why would we want to map a readonly memory space from host to guest? > We may want to do it to support memory semantics on read and mmio on > write, but do not right now unless something changed while I was not > looking. Some test cases in kvm-unit-tests and the benchmark i am writing for KVM need map the function on host to guest.