]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
x86/alternative: introduce alternative_2
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 7 Jul 2020 12:39:25 +0000 (14:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Jul 2020 12:39:25 +0000 (14:39 +0200)
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é <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/include/asm-x86/alternative.h

index 92e3581bc2c2d8e8f3494f09e764dec1fb45f279..8e78cc91c35b944c4e8a64dbd512b6b032b88360 100644 (file)
@@ -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.
  *