[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 09/37] xen/x86: introduce two helpers to access memory hotplug end


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Fri, 24 Sep 2021 12:21:43 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=70BDfoH8abFUJ4M2MbLLGe5j0d8DOpxenlSyI3vyyvs=; b=C6BRpxlsDcbMg9FRXZMXIOdCaytzB1YRNyJYz/zCShJlYJwGA9RCxR0Oq8dTNnR2LbMQQO9hKdsgZbMgg5JGSCbjHzKaHE7tKC6AE3NukiJc0LFWlwT3O5PBWM3XjhwzxSj3rmWEQKrSZk0zz/xxgStLtYjGbqpfmDokRA5XAclXKwpXF4VRx/NlfMBldsb7X7BqV64Bgmty1X9cjzRbjFQ6hHCKt0HDBUYxWTm2m5CN0wF3/ACagZ8Ck3yC17iR3UXb6GJOgmL6xIW+VjxaIb+ASHnVC9GPGmsiaLMwmpxXh7UPyt0iBAQgq22FuF6sdkcqpZfa9NL/Zj/QXbqMJQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IrHjkxOIP9NzLUAeor0glvLZIm4eq+OjwjunGFAnvGhjAdbrGtvd+rfWog76SK2dkFbZ3jQyQvVbIIEeB89GXb0qS52TuDp2NISou0Ga+4OoOVRVRtxLZeoBYeeADj31TCrmXRYzCUhhLTl4EAM8KEbMhrjjvfvG/1726/xyVg+7Nvk5UJ3QRxMK6o+U1pv3LyksHC1RDO6Erv09KsPO6tRdFH46CemS6J5gwsrV0ixu9f7qKUQGxzuK5jOV0RxJxwjJmIC9FJBRvriHq3b2/jjvejjyShgcYsMj9vhUNrV2bSpLYzYLX5pU/r3sLMYK1Y+a3mEGXamTJXH2wyXwOw==
  • Authentication-results-original: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, julien@xxxxxxx, Bertrand.Marquis@xxxxxxx, jbeulich@xxxxxxxx, andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, wl@xxxxxxx
  • Delivery-date: Fri, 24 Sep 2021 04:22:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com;



On 2021/9/24 8:29, Stefano Stabellini wrote:
+x86 maintainers

On Thu, 23 Sep 2021, Wei Chen wrote:
x86 provides a mem_hotplug to maintain the end of memory hotplug
                             ^ variable

end address. This variable can be accessed out of mm.c. We want
some code out of mm.c can be reused by other architectures without
                        ^ so that it can be reused

memory hotplug ability. So in this patch, we introduce these two
helpers to replace mem_hotplug direct access. This will give the
ability to stub these two API.
                             ^ APIs



OK

Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
---
  xen/include/asm-x86/mm.h | 10 ++++++++++
  1 file changed, 10 insertions(+)

diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h
index cb90527499..af2fc4b0cd 100644
--- a/xen/include/asm-x86/mm.h
+++ b/xen/include/asm-x86/mm.h
@@ -475,6 +475,16 @@ static inline int get_page_and_type(struct page_info *page,
extern paddr_t mem_hotplug; +static inline void mem_hotplug_update_boundary(paddr_t end)
+{
+    mem_hotplug = end;
+}
+
+static inline paddr_t mem_hotplug_boundary(void)
+{
+    return mem_hotplug;
+}
+
  
/******************************************************************************
   * With shadow pagetables, the different kinds of address start
   * to get get confusing.
--
2.25.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.