]> xenbits.xensource.com Git - xen.git/commitdiff
x86/alternative: introduce alternative_2
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 7 Jul 2020 13:42:34 +0000 (15:42 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Jul 2020 13:42:34 +0000 (15:42 +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>
master commit: 23570bce00ee6ba2139ece978ab6f03ff166e21d
master date: 2020-07-07 14:39:25 +0200

xen/include/asm-x86/alternative.h

index ba537d6b7e737515e59ec7abdea6dd44e3f19e25..7c34504f897b4d731bf732f1f0e0656a9fae29b8 100644 (file)
@@ -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.
  *