From patchwork Fri May 5 10:49:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gonglei (Arei)" X-Patchwork-Id: 9713391 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DD73A602B9 for ; Fri, 5 May 2017 10:51:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C536328678 for ; Fri, 5 May 2017 10:51:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B71B52869A; Fri, 5 May 2017 10:51:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 181DB28678 for ; Fri, 5 May 2017 10:51:30 +0000 (UTC) Received: from localhost ([::1]:46229 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6apd-0004Rb-Ez for patchwork-qemu-devel@patchwork.kernel.org; Fri, 05 May 2017 06:51:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6anl-0003cI-2l for qemu-devel@nongnu.org; Fri, 05 May 2017 06:49:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6ani-0002o1-0M for qemu-devel@nongnu.org; Fri, 05 May 2017 06:49:33 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:3972) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1d6anh-0002nJ-DM for qemu-devel@nongnu.org; Fri, 05 May 2017 06:49:29 -0400 Received: from 172.30.72.53 (EHLO DGGEMA405-HUB.china.huawei.com) ([172.30.72.53]) by dggrg01-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id ANZ27943; Fri, 05 May 2017 18:49:13 +0800 (CST) Received: from DGGEMA505-MBX.china.huawei.com ([169.254.1.117]) by DGGEMA405-HUB.china.huawei.com ([10.3.20.46]) with mapi id 14.03.0301.000; Fri, 5 May 2017 18:49:05 +0800 From: "Gonglei (Arei)" To: "Kevin O'Connor" , Paolo Bonzini , "Dr. David Alan Gilbert" , "quintela@redhat.com" Thread-Topic: [Question] SeaBIOS: cannot boot oracle linux if increase the maximum size of permanent high memory area Thread-Index: AdLFjTYm3y5MaDWdTl+Umj/+P14lNg== Date: Fri, 5 May 2017 10:49:05 +0000 Message-ID: <33183CC9F5247A488A2544077AF19020DA2650C5@DGGEMA505-MBX.china.huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.177.18.62] MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.590C58AB.0074, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=169.254.1.117, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: d78801c02cd8244a197fb8485b0ae49a X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 45.249.212.187 Subject: [Qemu-devel] [Question] SeaBIOS: cannot boot oracle linux if increase the maximum size of permanent high memory area X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Huangweidong \(C\)" , "jasowang@redhat.com" , "seabios@seabios.org" , "Xulei \(Stone\)" , "qemu-devel@nongnu.org" , "Wulizhen \(Pss\)" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi guys, Currently my workmate encountered an issues in the testing environment: A letter from him: In order to boot a BIG vm (with 4T mem, 255 vCPUs, 60 virtio-scsi disk...), i have to increase the BUILD_MAX_HIGHTABLE to 512KB. But, then i found i can not boot a specific VM anymore (oracle linux 6.7 64bits with kernel 3.8.13, 2G mem). It seems be related with the unused high ram given VM back by SeaBios (maybe also related to the memory align). I've tested if setting giveback memory 64KB alignment other than 4KB, SeaBios with 512KB BUILD_MAX_HIGHTABLE can boot the specific VM. But , i don't know the reason... As far as i know, if seabios does not give back the unused ZoneHigh memory seems will not trigger any problems but just waste only a little memory ,right? Can you tell me what's the worst effect if i apply the following patch? Does it influence live migration? Thanks! Regards, -Gonglei diff --git a/src/config.h b/src/config.h index baca029..b3536f1 100644 index baca029..b3536f1 100644 --- a/src/config.h +++ b/src/config.h @@ -17,7 +17,7 @@ // Maximum number of map entries in the e820 map #define BUILD_MAX_E820 32 // Space to reserve in high-memory for tables -#define BUILD_MAX_HIGHTABLE (256*1024) +#define BUILD_MAX_HIGHTABLE (512*1024) diff --git a/src/malloc.c b/src/malloc.c index 3733855..6302525 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -549,13 +549,7 @@ malloc_prepboot(void) dprintf(1, "Space available for UMB: %x-%x, %x-%x\n" , RomEnd, base, info->range_start, info->range_end); - // Give back unused high ram. - info = alloc_find_lowest(&ZoneHigh); - if (info) { - u32 giveback = ALIGN_DOWN(info->range_end-info->range_start, PAGE_SIZE); - e820_add(info->range_start, giveback, E820_RAM); - dprintf(1, "Returned %d bytes of ZoneHigh\n", giveback); - } calcRamSize();