From patchwork Thu Dec 17 17:46:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 58613 Delivered-To: patch@linaro.org Received: by 10.112.89.199 with SMTP id bq7csp518242lbb; Thu, 17 Dec 2015 09:49:52 -0800 (PST) X-Received: by 10.140.102.35 with SMTP id v32mr71741688qge.72.1450374591933; Thu, 17 Dec 2015 09:49:51 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p53si12236471qge.106.2015.12.17.09.49.51 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 17 Dec 2015 09:49:51 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:55463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9cgZ-0004zq-Gz for patch@linaro.org; Thu, 17 Dec 2015 12:49:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50797) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9cde-0000Dp-Jo for qemu-devel@nongnu.org; Thu, 17 Dec 2015 12:46:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9cdd-0006jg-KM for qemu-devel@nongnu.org; Thu, 17 Dec 2015 12:46:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9cdd-0006ja-FB for qemu-devel@nongnu.org; Thu, 17 Dec 2015 12:46:49 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 17F188F4F6 for ; Thu, 17 Dec 2015 17:46:49 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-23.ams2.redhat.com [10.36.112.23]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBHHkfc6014618; Thu, 17 Dec 2015 12:46:47 -0500 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 17 Dec 2015 18:46:00 +0100 Message-Id: <1450374401-31352-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1450374401-31352-1-git-send-email-pbonzini@redhat.com> References: <1450374401-31352-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Andrew Jones Subject: [Qemu-devel] [PULL 04/45] kvm-all: PAGE_SIZE should be real host page size X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Andrew Jones 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 Message-Id: <1447115022-4142-1-git-send-email-drjones@redhat.com> Signed-off-by: Paolo Bonzini --- kvm-all.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.5.0 diff --git a/kvm-all.c b/kvm-all.c index c648b81..a45c92b 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