From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwB2x-0001Ij-E0 for qemu-devel@nongnu.org; Tue, 10 Nov 2015 10:41:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwB2w-0004zF-Dv for qemu-devel@nongnu.org; Tue, 10 Nov 2015 10:41:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwB2w-0004zA-0s for qemu-devel@nongnu.org; Tue, 10 Nov 2015 10:41:22 -0500 References: <1447115022-4142-1-git-send-email-drjones@redhat.com> From: Paolo Bonzini Message-ID: <5642101C.5060104@redhat.com> Date: Tue, 10 Nov 2015 16:41:16 +0100 MIME-Version: 1.0 In-Reply-To: <1447115022-4142-1-git-send-email-drjones@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] kvm-all: PAGE_SIZE should be real host page size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Jones , qemu-devel@nongnu.org, kvm@vger.kernel.org On 10/11/2015 01:23, Andrew Jones wrote: > Just noticed this while grepping TARGET_PAGE_SIZE for an unrelated > reason. I didn't use qemu_real_host_page_size as kvm_set_phys_mem() > does, because we'd need to make sure page_size_init() has run first. > > Signed-off-by: Andrew Jones > --- > kvm-all.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/kvm-all.c b/kvm-all.c > index 1bc12737723c3..de9ff5971fb3b 100644 > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -45,8 +45,10 @@ > #include > #endif > > -/* KVM uses PAGE_SIZE in its definition of COALESCED_MMIO_MAX */ > -#define PAGE_SIZE TARGET_PAGE_SIZE > +/* KVM uses PAGE_SIZE in its definition of KVM_COALESCED_MMIO_MAX. We > + * need to use the real host PAGE_SIZE, as that's what KVM will use. > + */ > +#define PAGE_SIZE getpagesize() > > //#define DEBUG_KVM > > Is this a bugfix or just a cleanup? If the former, on which targets? Paolo