[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] xen/nospec: Include <xen/stdbool.h>
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Michal Orzel <michal.orzel@xxxxxxx>
- Date: Tue, 19 Mar 2024 09:50:42 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- 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=IdDJYdknS09+FYwajqYMbDGtPefBjlnA7m8a0jJp1AM=; b=MGPk7g1yX3SetnZ15KTDxMnEUr3Ib/yqdqF12GrdN3FIjv/LsOijUhhUaw6x1i/urVMav9N07wU7rxFZMc62s45ETphB4HSSBWDO4t15YlFseTl+lRXvIXkWiZRYpjrkddEWlAg/zRjqueUGtSpfQrgqTUW/xzowuA33PSse8GvACIV83b0pOIWafnv8fn53UtNE+bQ0lq3UlVlibKxXzAV8lZQn+GJcpIOxAS2nKMTBQBW+QAUxxA0BbW2f7gFkQyY8uMPftjImTcWXG+O1FWa5zOoBgxPcKMN3btLLBjoEsYeQu/fM8g07hoWiMnNda6qWEwZqMY0i+Zji+VoS5w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DkDKMetPCb+IiWrMHQAzXdbIXIvP0u5RHWVjHVHdABOQn/hWSk/u384nZZES7rNd0Jv2ZhWC8wDWc/VJ+pVvvLh67f2fMCtB9jrXkcihKdksTw6iL4cJdmYG6zSp7ApSxrDYjFn9joebLj2FIRkEviXZFDy8jW8wkg2LHfx1Pbr7SJvFi1MiJRPhRi+zwJv6T43+2XiKMs5GCALAYJhokXLebaUXltqe3mFnRwYDvJFBEbxqh+zV372GaGGeFYsbg/aQRBW07p0qrpTzG8tKbmIwtW+K5CcBTM3ud5zopNRUnXcI8kyLzZsrPX6G3YwuTeoz6w0KueJvPj6I6rfpoA==
- Cc: Michal Orzel <michal.orzel@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>
- Delivery-date: Tue, 19 Mar 2024 08:51:12 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
After introduction of lock_evaluate_nospec() using bool type, building
Xen on Arm with UBSAN enabled fails:
In file included from ./include/xen/spinlock.h:4,
from common/ubsan/ubsan.c:13:
./include/xen/nospec.h:79:22: error: unknown type name ‘bool’
79 | static always_inline bool lock_evaluate_nospec(bool condition)
There is no issue on x86, as xen/stdbool.h is included somewhere along
the asm/nospec.h path, which is not the case for other architectures.
Fixes: 7ef0084418e1 ("x86/spinlock: introduce support for blocking speculation
into critical regions")
Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
xen/include/xen/nospec.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xen/include/xen/nospec.h b/xen/include/xen/nospec.h
index e8d73f9538e5..9fb15aa26aa9 100644
--- a/xen/include/xen/nospec.h
+++ b/xen/include/xen/nospec.h
@@ -7,6 +7,8 @@
#ifndef XEN_NOSPEC_H
#define XEN_NOSPEC_H
+#include <xen/stdbool.h>
+
#include <asm/nospec.h>
/**
--
2.25.1
|