From nobody Fri Jan 19 16:33:05 2024 X-Original-To: virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TGlXf4KXBz56rPH for ; Fri, 19 Jan 2024 16:33:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TGlXd2wHgz44tn for ; Fri, 19 Jan 2024 16:33:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705681985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DGrdMJh7Z8yiHTSe2HBXS7CHFm8L3cE9OhkgEhKNwTU=; b=N3ct+yBypKkEVyQ2XyJyByrRzosxpSbarlXJLWqdUa8i7mAevqhZvuGFaL+gPvIJTQowIX QAmUpMvismwNJkSXiMyI0GjxPbeYpAxtkOHsNjflKQxODjEKb/Al8XHcnMLdPBgUuDTNKN cdK3aAQ4CRr0m6JARbjwBJeb53KAEvgQ/i6jNYDQeH7KYj/pyh38DxFkngVdh3AIsPoX6G H+RnY3qfP2irVCgvu6WK1K17d0XfAaQAOzzqA9RJbZVs9O/otKNQ9lnOCpDRVBDbAY5Rbo z8gOOmAb9ArnfTkt4wwxvE+sM7B1ABxvA/aYYyx2XOyyfa2fkINrHowe2orfWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705681985; a=rsa-sha256; cv=none; b=q11NZJfwh2FY7Ud/dmfq1M5cRbFzQ6eawAblolKmgdBNzqmEurVuWwqDp6VsNJ1p9L+wPg RvWutH0oNe4W70P1wPUbRvkgZ9rjcjtxTvNqm2hAm+21grzdw6pQZhHg7BVjLMkwXiebUE /cgW7qY/4aS24Zh0gLILRR8ceZq0RTL7XMBZdR8b7FuQheQJP3REOVS0mCHQshh1gyRRq7 48IRZjMc73EWy1C+e4KFR9Jx6ve7sOHk7lnQ4h7+SJ63pdYEzV6VjJpg6+Ai0J6DP1j28m yUQNWE432NXGgbMYvwQZUgGp3K1HtOouX8YjG8kTy/vc0B9LMhdrLXxG3yjC0g== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TGlXd22Q5zyXS for ; Fri, 19 Jan 2024 16:33:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 40JGX5fh004851 for ; Fri, 19 Jan 2024 16:33:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 40JGX5Iu004842 for virtualization@FreeBSD.org; Fri, 19 Jan 2024 16:33:05 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 276463] Linux guest uses only 503G of memory when using UEFI loader Date: Fri, 19 Jan 2024 16:33:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: bhyve X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: antranigv@freebsd.am X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276463 Bug ID: 276463 Summary: Linux guest uses only 503G of memory when using UEFI loader Product: Base System Version: 13.2-RELEASE Hardware: amd64 OS: Any Status: New Keywords: bhyve Severity: Affects Only Me Priority: --- Component: bhyve Assignee: virtualization@FreeBSD.org Reporter: antranigv@freebsd.am Created attachment 247783 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D247783&action= =3Dedit Information about the Linux Guest We have a massive system (details below) which runs a massive VM. The host = runs on FreeBSD while the VM guest is Ubuntu Linux. ``` Host Information: root@genomic:~ # sysctl hw.model hw.model: AMD EPYC 7702 64-Core Processor=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 root@genomic:~ # sysctl hw.ncpu hw.ncpu: 256 root@genomic:~ # sysctl hw.physmem hw.physmem: 2185595944960 root@genomic:~ # sysctl hw.realmem hw.realmem: 2200361238528 ``` The VM uses 1.5TB of RAM, here's the VM configuration: ``` # vm info comp0 ------------------------ Virtual Machine: comp0 ------------------------ state: stopped datastore: default loader: uefi uuid: 2893e12c-637d-11ee-af94-7cc255269cb8 cpu: 240 cpu-topology: sockets=3D2, cores=3D60, threads=3D2 memory: 1536G network-interface number: 0 emulation: virtio-net virtual-switch: public fixed-mac-address: 58:9c:fc:0e:4b:00 fixed-device: - virtual-disk number: 0 device-type: file emulation: virtio-blk options: - system-path: /usr/local/vm/comp0/disk0.img bytes-size: 216895848448 (202.000G) bytes-used: 190077076480 (177.023G) ``` and here's the bhyve arguments according to vm-bhyve: ``` Jan 19 15:40:32: [bhyve options: -c 240,sockets=3D2,cores=3D60,threads=3D2= -m 1536G -Hwl bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -U 2893e12c-637d-11ee-af94-7cc255269cb8 -u -S] Jan 19 15:40:32: [bhyve devices: -s 0,hostbridge -s 31,lpc -s 4:0,virtio-blk,/usr/local/vm/comp0/disk0.img -s 5:0,virtio-blk,/dev/zvol/zscratch/scratch -s 6:0,virtio-net,tap0,mac=3D58:9c:fc:0e:4b:00 -s 7:0,passthru,68/0/81 -s 8:0,fbuf,tcp=3D127.0.0.1:5900,wait] ``` We've been using the GRUB loader for a while and decided to move to the UEFI loader. After the migration we noticed that Linux shows only 503GB of RAM f= rom the 1.5TB allocated. We didn't have such issue when using the grub loader. I'm attaching a tarball which has information of the Linux system, including the following files. linux_uefi_iomem.txt =E2=80=94 /proc/iomem linux_uefi_meminfo.txt =E2=80=94 /proc/meminfo linux_uefi_vmstat.txt =E2=80=94 /proc/vmstat linux_uefi_dmidecode.txt =E2=80=94 dmidecode linux_uefi_free.txt =E2=80=94 free linux_uefi_dmesg.txt =E2=80=94 dmesg linux_uefi_cpuinfo.txt =E2=80=94 /proc/cpuinfo We've also noticed that inside of TianoCore's UEFI menu, it shows the 1.5TB= of RAM properly (check screenshot at: https://notes.bsd.am/bhyve_uefi_menu.png= ) Not sure if this is an issue with Linux or bhyve's UEFI loader. any tips are appreciated. --=20 You are receiving this mail because: You are the assignee for the bug.=