From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9v2F-0008R5-Lr for qemu-devel@nongnu.org; Fri, 07 Sep 2012 05:39:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9v2E-0004DS-Ms for qemu-devel@nongnu.org; Fri, 07 Sep 2012 05:39:35 -0400 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:54424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9v2E-0004D7-4v for qemu-devel@nongnu.org; Fri, 07 Sep 2012 05:39:34 -0400 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 7 Sep 2012 19:37:22 +1000 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q879dN8s29294714 for ; Fri, 7 Sep 2012 19:39:26 +1000 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q879dN1K011778 for ; Fri, 7 Sep 2012 19:39:23 +1000 Message-ID: <5049C0C8.3060106@linux.vnet.ibm.com> Date: Fri, 07 Sep 2012 17:39:20 +0800 From: Xiao Guangrong MIME-Version: 1.0 References: <1347006389-543-1-git-send-email-liusheng@linux.vnet.ibm.com> <1347006389-543-3-git-send-email-liusheng@linux.vnet.ibm.com> <5049B523.8090303@siemens.com> In-Reply-To: <5049B523.8090303@siemens.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/3] update kvm related the head file from kernel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: aliguori@us.ibm.com, kvm@vger.kernel.org, mtosatti@redhat.com, qemu-devel@nongnu.org, avi@redhat.com, Liu Sheng Hi Jan, Thanks for your review. On 09/07/2012 04:49 PM, Jan Kiszka wrote: >> +#ifdef __KVM_HAVE_READONLY_MEM >> + __u8 write_readonly_mem; >> +#endif >> } mmio; >> /* KVM_EXIT_HYPERCALL */ >> struct { >> @@ -618,6 +625,9 @@ struct kvm_ppc_smmu_info { >> #define KVM_CAP_PPC_GET_SMMU_INFO 78 >> #define KVM_CAP_S390_COW 79 >> #define KVM_CAP_PPC_ALLOC_HTAB 80 >> +#ifdef __KVM_HAVE_READONLY_MEM >> +#define KVM_CAP_READONLY_MEM 81 >> +#endif > > Sorry for commenting on the wrong patch, this must be fixed in the > kernel: no more conditional CAPs, please. There are some common code depend on KVM_CAP_READONLY_MEM, such as, check_memory_region_flags() and write_readonly_mem field in mmio-exit-info. Yes, we can use #ifdef CONFIG_X86 to enable it only on x86, but it is hard to expand this feather to other arches in the further. So, i used __KVM_HAVE_READONLY_MEM and only defined it on x86. :)