From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH] kvm tools: Make the whole guest memory mergeable Date: Fri, 16 Dec 2011 07:50:21 +0200 Message-ID: <1324014621.4496.3.camel@lappy> References: <1323997263-2031-1-git-send-email-zanghongyong@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, penberg@kernel.org, xiaowei.yang@huawei.com, hanweidong@huawei.com, wusongwei@huawei.com, kongbo@huawei.com To: zanghongyong@huawei.com Return-path: Received: from mail-ee0-f46.google.com ([74.125.83.46]:53803 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750755Ab1LPFu2 (ORCPT ); Fri, 16 Dec 2011 00:50:28 -0500 Received: by eekc4 with SMTP id c4so2866143eek.19 for ; Thu, 15 Dec 2011 21:50:27 -0800 (PST) In-Reply-To: <1323997263-2031-1-git-send-email-zanghongyong@huawei.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, 2011-12-16 at 09:01 +0800, zanghongyong@huawei.com wrote: > If a guest's ram_size exceeds KVM_32BIT_GAP_START, the corresponding kvm tool's > virtual address size should be (ram_size + KVM_32BIT_GAP_SIZE), rather than ram_size. You're right. There are more places than just the madvise() code which make the same error you've spotted (for example, the memslot allocation code), so instead of trying to fix all of them I'd suggest to just update ram_size in kvm__arch_init() before allocating everything - that should fix all of them at once. -- Sasha.