From nobody Sun Apr 28 19:43:30 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 80.81.252.135 is neither permitted nor denied by domain of seabios.org) client-ip=80.81.252.135; envelope-from=seabios-bounces@seabios.org; helo=mail.coreboot.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 80.81.252.135 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; Return-Path: Received: from mail.coreboot.org (mail.coreboot.org [80.81.252.135]) by mx.zohomail.com with SMTPS id 1493981392191547.3677878989679; Fri, 5 May 2017 03:49:52 -0700 (PDT) Received: from [127.0.0.1] (helo=ra.coresystems.de) by mail.coreboot.org with esmtp (Exim 4.86_2) (envelope-from ) id 1d6anw-0003pS-6z; Fri, 05 May 2017 12:49:44 +0200 Received: from szxga01-in.huawei.com ([45.249.212.187]) by mail.coreboot.org with esmtps (TLSv1:RC4-SHA:128) (Exim 4.86_2) (envelope-from ) id 1d6ann-0003oM-Cp for seabios@seabios.org; Fri, 05 May 2017 12:49:43 +0200 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-Spam-Score: -6.2 (------) Subject: [SeaBIOS] [Question] SeaBIOS: cannot boot oracle linux if increase the maximum size of permanent high memory area X-BeenThere: seabios@seabios.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SeaBIOS mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Huangweidong \(C\)" , "jasowang@redhat.com" , "seabios@seabios.org" , "qemu-devel@nongnu.org" , "Wulizhen \(Pss\)" Content-Transfer-Encoding: quoted-printable Errors-To: seabios-bounces@seabios.org Sender: "SeaBIOS" X-Duff: Orig. Duff, Duff Lite, Duff Dry, Duff Dark, Raspberry Duff, Lady Duff, Red Duff, Tartar Control Duff X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Hi guys,=20 Currently my workmate encountered an issues in the testing environment:=20 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=20 BUILD_MAX_HIGHTABLE to 512KB. But, then i found i can not boot a specific VM anymore (oracle linux 6.7 6= 4bits with kernel 3.8.13, 2G mem). It seems be related with the unused high ram given VM back by SeaBios (mayb= e also related to the memory align). I've tested if setting giveback memory 64KB alignment other than 4KB, SeaBi= os 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?=20 Does it influence live migration? Thanks! 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 =3D alloc_find_lowest(&ZoneHigh); - if (info) { - u32 giveback =3D ALIGN_DOWN(info->range_end-info->range_start, PAG= E_SIZE); - e820_add(info->range_start, giveback, E820_RAM); - dprintf(1, "Returned %d bytes of ZoneHigh\n", giveback); - } calcRamSize(); Regards, -Gonglei _______________________________________________ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios