From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UY9FU-0001Vs-Ar for qemu-devel@nongnu.org; Fri, 03 May 2013 02:13:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UY9FR-00069J-Te for qemu-devel@nongnu.org; Fri, 03 May 2013 02:13:40 -0400 Received: from e23smtp02.au.ibm.com ([202.81.31.144]:56016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UY9FR-000697-9s for qemu-devel@nongnu.org; Fri, 03 May 2013 02:13:37 -0400 Received: from /spool/local by e23smtp02.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 3 May 2013 16:05:21 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id D78C82BB004F for ; Fri, 3 May 2013 16:13:20 +1000 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r435xYLT8847488 for ; Fri, 3 May 2013 15:59:35 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r436DJxR021032 for ; Fri, 3 May 2013 16:13:19 +1000 Message-ID: <5183557D.9080202@linux.vnet.ibm.com> Date: Fri, 03 May 2013 14:13:17 +0800 From: Xiao Guangrong MIME-Version: 1.0 References: <1367137941-4310-1-git-send-email-jordan.l.justen@intel.com> <1367137941-4310-4-git-send-email-jordan.l.justen@intel.com> In-Reply-To: <1367137941-4310-4-git-send-email-jordan.l.justen@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/6] kvm: workaround a possible KVM bug when using KVM_MEM_READONLY List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jordan Justen Cc: qemu-devel@nongnu.org On 04/28/2013 04:32 PM, Jordan Justen wrote: > On a Linux 3.8.0 based kernel, I occasionally saw a situation > where the memory region would continue to trap on memory > read even though KVM_MEM_READONLY was set. > > I found that if I set the slot to a size of 0, and before > setting the slot, it would then behave as expected. Yes, the KVM_MEM_READONLY flag can not be directly changed, see the commit 75d61fbcf563373696578570e914f555e12c8d97 on kvm tree. Do you think the way which deletes the memslot before changing the KVM_MEM_READONLY hurts the performance? If yes, i will make it be directly changed. Thanks for you implementing the READONLY memory in Qemu. Reviewed-by: Xiao Guangrong