[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/6] x86/cpu-policy: Drop build time cross-checks of featureset sizes
- To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Thu, 4 May 2023 20:39:19 +0100
- Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Thu, 04 May 2023 19:39:40 +0000
- Ironport-data: A9a23:xtR7A6qaSWy9tRyHh+JDUNRPxhxeBmJpZRIvgKrLsJaIsI4StFCzt garIBmGOPmMM2XyKNhzaYXkpEwE78ODmoRhSFNqrHs3ES1D85uZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06WJwUmAWP6gR5weDzyVNVvrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXAHMmVTCFi8aX/Orhe7FXjPoxM8XoDrpK7xmMzRmBZRonaZXKQqGM7t5ExjYgwMtJGJ4yZ eJAN2ApNk6ZJUQSZBFOUslWcOSA3xETdxVxrl6PqLVxyG/U1AFri5DmMcbPe8zMTsJQ9qqdj jueoDuoXU5GarRzzxKgzkywvu+MwhrbG5xOMLel79JAkly6kzl75Bo+CgLg/KjRZlSFc8JSL QkY9zQjqYA29Ve3VZ/tUhugunmGsxUAHd1KHIUSyiuA167V6AaxHXUfQ3hKb9lOnNAybSwn0 BmOhdyBONB0mOTLEzTHrO7S9G7sf3FPdgfueBPoUyNGyOLDpo0Xry6XFOc7K6SLnML5GgPJl mXiQDcFu1kDsSIa//zlrQuf2mj8+cehoh0dvVuOAD/8hu9tTMv8PtHztwCGhRpVBNzBJmRtq kTojCR3AAomKZiW3BKAT+wWdF1Cz6bUaWaM6bKD8nRIythMx5JAVdoKiN2GDB01WvvogBewC KMphStf5YVIIFyhZrJtboS6BqwClPawTo6/CKyNP4IVPfCdkTO6ENxGPxbMjwgBbmB1+U3AB XtrWZn1VitLYUiW5DG3W/0cwdcW+8zK/kuKHcqT503+gdKjiIu9Fe9t3K2mMrpos8tpYWz9r 75iCid9408CC7OjOHOMqdF7wJJjBSFTOK0aYvd/LoarSjeK0kl7YxMN6dvNo7BYopk=
- Ironport-hdrordr: A9a23:P+/wOKvIVTjVFEL5TrabSDgW7skDTtV00zEX/kB9WHVpmszxra 6TdZMgpGbJYVcqKRcdcL+7WJVoLUmxyXcx2/h1AV7AZniAhILLFvAA0WKK+VSJcEeSygce79 YFT0EXMqyJMbEQt6fHCWeDfOrIuOP3kpyVuQ==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
These BUILD_BUG_ON()s exist to cover the curious absence of a diagnostic for
code which looks like:
uint32_t foo[1] = { 1, 2, 3 };
However, GCC 12 at least does now warn for this:
foo.c:1:24: error: excess elements in array initializer [-Werror]
884 | uint32_t foo[1] = { 1, 2, 3 };
| ^
foo.c:1:24: note: (near initialization for 'foo')
and has found other array length issues which we want to fix. Drop the cross
check now tools can spot the problem case directly.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
---
xen/arch/x86/cpu-policy.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/xen/arch/x86/cpu-policy.c b/xen/arch/x86/cpu-policy.c
index ef6a2d0d180a..44c88debf958 100644
--- a/xen/arch/x86/cpu-policy.c
+++ b/xen/arch/x86/cpu-policy.c
@@ -883,12 +883,6 @@ void __init init_dom0_cpuid_policy(struct domain *d)
static void __init __maybe_unused build_assertions(void)
{
- BUILD_BUG_ON(ARRAY_SIZE(known_features) != FSCAPINTS);
- BUILD_BUG_ON(ARRAY_SIZE(pv_max_featuremask) != FSCAPINTS);
- BUILD_BUG_ON(ARRAY_SIZE(hvm_shadow_max_featuremask) != FSCAPINTS);
- BUILD_BUG_ON(ARRAY_SIZE(hvm_hap_max_featuremask) != FSCAPINTS);
- BUILD_BUG_ON(ARRAY_SIZE(deep_features) != FSCAPINTS);
-
/* Find some more clever allocation scheme if this trips. */
BUILD_BUG_ON(sizeof(struct cpu_policy) > PAGE_SIZE);
--
2.30.2
|