From: Roger Pau Monné Date: Tue, 7 Jul 2020 13:31:20 +0000 (+0200) Subject: x86/alternative: introduce alternative_2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8976bab464775e2713ec8b6c910986d13891df3a;p=xen.git 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 master commit: 23570bce00ee6ba2139ece978ab6f03ff166e21d master date: 2020-07-07 14:39:25 +0200 --- diff --git a/xen/include/asm-x86/alternative.h b/xen/include/asm-x86/alternative.h index ba537d6b7e..7c34504f89 100644 --- a/xen/include/asm-x86/alternative.h +++ b/xen/include/asm-x86/alternative.h @@ -85,6 +85,11 @@ extern void alternative_instructions(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. *