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

[PATCH v6 06/11] xen/arm: add ASSERT_UNREACHABLE in allocate_static_memory


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <julien@xxxxxxx>
  • From: Penny Zheng <penny.zheng@xxxxxxx>
  • Date: Mon, 14 Feb 2022 03:19:51 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NA3/zFgsd8czwwlA2vS7TK6OY5eYCgsFdWBPbAyOYuI=; b=aE/mVwJIl9qy/cY/okStLtDn5n8qXatoEneArWOpVPIrfce0VzJ156xJnMNVc1iwQJwvYAhVPg+67Vaf/idYdQ2Y9dZtprgDOAURFPRTAIgfj+reNWGEYDwVY0UH98GmVeCX6gfJysr6nYjIkDRzxHFIAu+SncembhMDQFn0Co3UMmKDxkV7S5QHiHNc6O5PUevH0L40Do5NZ4VAbxkgOcyE4orUzHsKUZpToHTrpeKihUsrkbrNPpbJruL6tZEhytsh0RX73Aaa8WcQoQCnhlgspIe9bhJ6OFoj6qigpCfg9ZMjkANgLqzbPF8qwPPrZO343JiqY6xwrnPHvgWjAA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VFTH8IxnJjqD2STISE2u8vrCQftScDLU7DiSLIZEh1FIZsS8V1aEfcBZHZMKYWZiGiO29esc4+9E2UMUjgxKFb0SzsHYPC9JRu0Y1zjzqtbrmJXa6uTaq2HygZ2D7Xp6WirzZ7Y9iOVK/kYjYGM1u8ra0N9I0fat6PlgCj5le/oLJ+PdmSWgl3TnIcWuceRMLi39J6Z5gZdb8l5LwtLBF0SFCDqO9hRmXyqgfamyKMdmqoA4PGZO5aPSjlq2tkMyoi6duzL5OPp/+lC3L00jQjxqrovrxuI4PfR5z1raJUFmbyIrQzF13hPvsjD+eucXTI/o+Hrf/uk/UXBbgG4o4w==
  • Cc: <Bertrand.Marquis@xxxxxxx>, <Wei.Chen@xxxxxxx>
  • Delivery-date: Mon, 14 Feb 2022 03:21:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true

Helper allocate_static_memory is not meant to be reachable when built with
!CONFIG_STATIC_MEMORY, so this commit adds ASSERT_UNREACHABLE in it to catch
potential misuse.

Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
Acked-by: Julien Grall <jgrall@xxxxxxxxxx>
Tested-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
v3 changes:
- new commit
---
v4 changes:
- nothing changed
---
v5 changes:
- nothing changed
---
v6 changes:
- nothing changed
---
 xen/arch/arm/domain_build.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index ec29bd302c..52f256de9c 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -755,6 +755,7 @@ static void __init allocate_static_memory(struct domain *d,
                                           struct kernel_info *kinfo,
                                           const struct dt_device_node *node)
 {
+    ASSERT_UNREACHABLE();
 }
 
 static void __init assign_static_memory_11(struct domain *d,
-- 
2.25.1




 


Rackspace

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