From patchwork Thu Mar 26 18:07:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Morse X-Patchwork-Id: 11460729 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1A34D913 for ; Thu, 26 Mar 2020 18:10:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C8AE120722 for ; Thu, 26 Mar 2020 18:10:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tzu3EXlm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C8AE120722 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Gwe5GgP6RKfu+KgWs9JqhHUZKValH901KaFNBnRb7cA=; b=tzu3EXlmU8wHAa bVxRlAYo663mA/18Z6K/pJBX4yMvbMlwlz1aL15DiWRJSEobol6urLN4oyeIvp+SjNaYnAPeIMLQA 0HFH76RBU11FKiDX5arzxRyVbwLA30AKqnjcoCrqCb1U0XFNeoT1G9E83iulw+ZqztZTYud5sy7p3 8Alyse+ZirGhjI5ztuEAbrywNwsvJOJENbP9rcqaM+3T1gIKWd7qQuVqUSYsSQognwFCxG460+0ih Ch0vAR3QYARYLj43dmiCOcoTJZ9obSpAdN5KZf+6U9CUcJ8UfPkWx60mk7NCeBYvv1IpwJhn2ynPG NAztmUPP+PDHigzBICxw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jHWxO-00017S-R6; Thu, 26 Mar 2020 18:10:18 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jHWvc-00072v-2L; Thu, 26 Mar 2020 18:08:39 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0693B1045; Thu, 26 Mar 2020 11:08:27 -0700 (PDT) Received: from melchizedek.cambridge.arm.com (melchizedek.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AAB503F71E; Thu, 26 Mar 2020 11:08:25 -0700 (PDT) From: James Morse To: kexec@lists.infradead.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] kexec: Prevent removal of memory in use by a loaded kexec image Date: Thu, 26 Mar 2020 18:07:28 +0000 Message-Id: <20200326180730.4754-2-james.morse@arm.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200326180730.4754-1-james.morse@arm.com> References: <20200326180730.4754-1-james.morse@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200326_110828_230011_7BAAD2D6 X-CRM114-Status: GOOD ( 13.96 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [217.140.110.172 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anshuman Khandual , Catalin Marinas , Bhupesh Sharma , James Morse , Eric Biederman , Andrew Morton , Will Deacon Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org An image loaded for kexec is not stored in place, instead its segments are scattered through memory, and are re-assembled when needed. In the meantime, the target memory may have been removed. Because mm is not aware that this memory is still in use, it allows it to be removed. Add a memory notifier to prevent the removal of memory regions that overlap with a loaded kexec image segment. e.g., when triggered from the Qemu console: | kexec_core: memory region in use | memory memory32: Offline failed. Signed-off-by: James Morse --- kernel/kexec_core.c | 56 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c index c19c0dad1ebe..ba1d91e868ca 100644 --- a/kernel/kexec_core.c +++ b/kernel/kexec_core.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -22,10 +23,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -1219,3 +1222,56 @@ void __weak arch_kexec_protect_crashkres(void) void __weak arch_kexec_unprotect_crashkres(void) {} + +/* + * If user-space wants to offline memory that is in use by a loaded kexec + * image, it should unload the image first. + */ +static int mem_remove_cb(struct notifier_block *nb, unsigned long action, + void *data) +{ + int rv = NOTIFY_OK, i; + struct memory_notify *arg = data; + unsigned long pfn = arg->start_pfn; + unsigned long nr_segments, sstart, send; + unsigned long end_pfn = arg->start_pfn + arg->nr_pages; + + might_sleep(); + + if (action != MEM_GOING_OFFLINE) + return NOTIFY_DONE; + + mutex_lock(&kexec_mutex); + if (kexec_image) { + nr_segments = kexec_image->nr_segments; + + for (i = 0; i < nr_segments; i++) { + sstart = PFN_DOWN(kexec_image->segment[i].mem); + send = PFN_UP(kexec_image->segment[i].mem + + kexec_image->segment[i].memsz); + + if ((pfn <= sstart && sstart < end_pfn) || + (pfn <= send && send < end_pfn)) { + pr_warn("Memory region in use\n"); + rv = NOTIFY_BAD; + break; + } + } + } + mutex_unlock(&kexec_mutex); + + return rv; +} + +static struct notifier_block mem_remove_nb = { + .notifier_call = mem_remove_cb, +}; + +static int __init register_mem_remove_cb(void) +{ + if (IS_ENABLED(CONFIG_MEMORY_HOTPLUG)) + return register_memory_notifier(&mem_remove_nb); + + return 0; +} +device_initcall(register_mem_remove_cb); From patchwork Thu Mar 26 18:07:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Morse X-Patchwork-Id: 11460731 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 809596CA for ; Thu, 26 Mar 2020 18:10:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 543F920714 for ; Thu, 26 Mar 2020 18:10:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nkYqGvcx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 543F920714 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=z5IVvGJ/cbxehncqjdt5N/SXoEKk/mlY1dSLjIqxS58=; b=nkYqGvcxXNz8xe OiaruXJXG2kQVphLeYjmR0jUod/ESv0XA/q0Cpk2ZefmzHJ9iVrEwkatl4/6HZnaamBJAKBlsIlBM 13ibCmYHu7t3CvXvizjcTBqrhDHTmVEyWkLC4Mq5nuoVK8lGO2+XmEDEgzKRYbpGwGcJBNlk5k9B9 ddOD9O801FoEzc6q+0i/ZMdNgD/cxM/hyLETPKfil9GRHIyduaLMN+wBdIuF+W+7imMVVDFVvE5Ay 6Ax0FK9HhxehEVeeIEQZGuzZgX6aHDq7qisS2Q/kKKhTehHwxw5NblOocSnwBNIHfrMRpEnz9swFJ yZpNJTL1yLVHpUQXPuFg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jHWxh-0001Mw-NP; Thu, 26 Mar 2020 18:10:37 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jHWvg-00076h-7z; Thu, 26 Mar 2020 18:08:45 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3C45C7FA; Thu, 26 Mar 2020 11:08:31 -0700 (PDT) Received: from melchizedek.cambridge.arm.com (melchizedek.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E19AB3F71E; Thu, 26 Mar 2020 11:08:29 -0700 (PDT) From: James Morse To: kexec@lists.infradead.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] mm/memory_hotplug: Allow arch override of non boot memory resource names Date: Thu, 26 Mar 2020 18:07:29 +0000 Message-Id: <20200326180730.4754-3-james.morse@arm.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200326180730.4754-1-james.morse@arm.com> References: <20200326180730.4754-1-james.morse@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200326_110832_347102_8B5576E6 X-CRM114-Status: GOOD ( 13.13 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [217.140.110.172 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anshuman Khandual , Catalin Marinas , Bhupesh Sharma , James Morse , Eric Biederman , Andrew Morton , Will Deacon Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Memory added to the system by hotplug has a 'System RAM' resource created for it. This is exposed to user-space via /proc/iomem. This poses problems for kexec on arm64. If kexec decides to place the kernel in one of these newly onlined regions, the new kernel will find itself booting from a region not described as memory in the firmware tables. Arm64 doesn't have a structure like the e820 memory map that can be re-written when memory is brought online. Instead arm64 uses the UEFI memory map, or the memory node from the DT, sometimes both. We never rewrite these. Allow an architecture to specify a different name for these hotplug regions. Signed-off-by: James Morse --- mm/memory_hotplug.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 0a54ffac8c68..69b03dd7fc74 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -42,6 +42,10 @@ #include "internal.h" #include "shuffle.h" +#ifndef MEMORY_HOTPLUG_RES_NAME +#define MEMORY_HOTPLUG_RES_NAME "System RAM" +#endif + /* * online_page_callback contains pointer to current page onlining function. * Initially it is generic_online_page(). If it is required it could be @@ -103,7 +107,7 @@ static struct resource *register_memory_resource(u64 start, u64 size) { struct resource *res; unsigned long flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY; - char *resource_name = "System RAM"; + char *resource_name = MEMORY_HOTPLUG_RES_NAME; if (start + size > max_mem_size) return ERR_PTR(-E2BIG); From patchwork Thu Mar 26 18:07:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Morse X-Patchwork-Id: 11460807 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 96AF792A for ; Thu, 26 Mar 2020 18:34:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 63D042070A for ; Thu, 26 Mar 2020 18:34:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Y35UTkj8"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="tgOlmmlP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 63D042070A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ao9UXqk6qGpaA+H/lbIBj26an5OW1zBJOnmg/hTJk3I=; b=Y35UTkj8kLVoAa 9XxfJ5HxZu4UR+2urMBuTd2bNKrmCea4YMXNI6b6QM/yVXQiLQ00QZc5qmW+E8lgn7oAJk/HrKrdU q5yUTsJyZbUCgYHkr0eNCmVeARD8lo4Eqj8nw5KRF5Uko/WrrmTXbGnqRYTYpHH/gP2wTqSKmgJgB SaJIcUBGP5U5yhQaz3iP0XXgFtXkE+O4DQIL1TRE5x5RzEHLt9KnwXZuzNg5LBQvhopcTdRHdg13B fe+wMUqNzBWWZC5xUz27Z7NRLltnl8Zoq2HwClrma7pR6w0uAPdQHP6s4Ow5Yxxo7AHJJPqo9n6yI Slq5tfVJnbbzzhhXlefw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jHXKK-0001Q4-AD; Thu, 26 Mar 2020 18:34:00 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jHXKD-0001Lm-8F; Thu, 26 Mar 2020 18:33:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=fhH9BuSGuHCqPuzk2ikmxRR1T8zfMgeKcqPNxk2j98k=; b=tgOlmmlPmN1l7hcK2nbUDJVOaU 03JaJhN9E3+HGu0gVQA4ChshhDkbvMe6/wszy1fWfcUmvErBAazZF7z/ljmApE1uBrhFST+9y0zrF jNoRl2Gj0mdNFPwjGNQJN3MbBsT4Qr6nqXM9+MtZORvUbm6t8SkWErcle8TMXluDqDOT6AMLQT3wX Udvacrq0dSoSdrtWK7PqR9ZUaZdvtP8BG1q7luKTYmgOV4dbIRXXFtn+cnbgX4a4kkOrBhlTrF6Jo BDyr6O8dVdiFvIzEhNGCByWSrsEcXudN/xcqP2sHUmgtrZ/3qscxk7BFPDsJCUgS0IKN+i2wXUGB6 LUvMvjjQ==; Received: from foss.arm.com ([217.140.110.172]) by casper.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jHWvm-0006kQ-4I; Thu, 26 Mar 2020 18:08:43 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 142A71063; Thu, 26 Mar 2020 11:08:35 -0700 (PDT) Received: from melchizedek.cambridge.arm.com (melchizedek.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B2A023F71E; Thu, 26 Mar 2020 11:08:33 -0700 (PDT) From: James Morse To: kexec@lists.infradead.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] arm64: memory: Give hotplug memory a different resource name Date: Thu, 26 Mar 2020 18:07:30 +0000 Message-Id: <20200326180730.4754-4-james.morse@arm.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200326180730.4754-1-james.morse@arm.com> References: <20200326180730.4754-1-james.morse@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200326_180838_389603_D131246E X-CRM114-Status: GOOD ( 12.09 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [217.140.110.172 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anshuman Khandual , Catalin Marinas , Bhupesh Sharma , James Morse , Eric Biederman , Andrew Morton , Will Deacon Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org If kexec chooses to place the kernel in a memory region that was added after boot, we fail to boot as the kernel is running from a location that is not described as memory by the UEFI memory map or the original DT. To prevent unaware user-space kexec from doing this accidentally, give these regions a different name. Signed-off-by: James Morse --- This is a change in behaviour as seen by user-space, because memory hot-add has already been merged. arch/arm64/include/asm/memory.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index 2be67b232499..ef1686518469 100644 --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h @@ -166,6 +166,17 @@ #define IOREMAP_MAX_ORDER (PMD_SHIFT) #endif +/* + * Memory hotplug allows new regions of 'System RAM' to be added to the system. + * These aren't described as memory by the UEFI memory map, or DT memory node. + * If we kexec from one of these regions, the new kernel boots from a location + * that isn't described as RAM. + * + * Give these resources a different name, so unaware kexec doesn't do this by + * accident. + */ +#define MEMORY_HOTPLUG_RES_NAME "System RAM (hotplug)" + #ifndef __ASSEMBLY__ extern u64 vabits_actual; #define PAGE_END (_PAGE_END(vabits_actual))