From d62365801ae339f00708cd66aef7d53caea685ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roger=20Pau=20Monn=C3=A9?= Date: Tue, 7 Jul 2020 15:23:55 +0200 Subject: [PATCH] x86/alternative: introduce alternative_2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- 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 619472efcb..3e608e8633 100644 --- a/xen/include/asm-x86/alternative.h +++ b/xen/include/asm-x86/alternative.h @@ -113,6 +113,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. * -- 2.30.2