Skip to contentSkip to conversation

x86emul: mark new "cp" local var maybe-unused

PATCH In review Jan Beulich 2 participants 2 messages Sep 6, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86emul: mark new "cp" local var maybe-unused

Just for the sake of the 32-bit build of the test harness. This wants reverting once unconditional uses of the variable appear (AMX, AVX10).

Fixes b20e3fbc3ec9 ("x86emul: introduce a struct cpu_policy * local in x86_emulate()")
xen/arch/x86/x86_emulate/x86_emulate.c +1 -1
@@ -1233,7 +1233,7 @@ x86_emulate(
 {
     /* Shadow copy of register state. Committed on successful emulation. */
     struct cpu_user_regs _regs = *ctxt->regs;
-    const struct cpu_policy *cp = ctxt->cpu_policy;
+    const struct cpu_policy *__maybe_unused cp = ctxt->cpu_policy;
     struct x86_emulate_state state;
     int rc;
     uint8_t b, d, *opc = NULL;