From: Roger Pau Monné Subject: [PATCH v5 7/9] x86/alternative: introduce alternative_2 It's based on alternative_io_2 without inputs or outputs but with an added memory clobber. This is part of XSA-321. Signed-off-by: Roger Pau Monné Acked-by: Jan Beulich --- Changes since v3: - Slightly reword commit message. Changes since v2: - Reword the commit message to note the addition of the memory clobber. --- xen/include/asm-x86/alternative.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/include/asm-x86/alternative.h b/xen/include/asm-x86/alternative.h index 92e3581bc2..8e78cc91c3 100644 --- a/xen/include/asm-x86/alternative.h +++ b/xen/include/asm-x86/alternative.h @@ -114,6 +114,11 @@ extern void alternative_branches(void); #define alternative(oldinstr, newinstr, feature) \ asm volatile (ALTERNATIVE(oldinstr, newinstr, feature) : : : "memory") +#define alternative_2(oldinstr, newinstr1, feature1, newinstr2, feature2) \ + asm volatile (ALTERNATIVE_2(oldinstr, newinstr1, feature1, \ + newinstr2, feature2) \ + : : : "memory") + /* * Alternative inline assembly with input. * -- 2.26.2