From b42cf31d1165f06032f205a2bd71f5d099ea2218 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 1 Oct 2024 09:47:05 +0200 Subject: [PATCH] x86: use alternative_input() in cache_flush() There's no point using alternative_io() when there are no outputs. While there drop the unnecessary semicolon after "ds". No functional change. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- xen/arch/x86/flushtlb.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/flushtlb.c b/xen/arch/x86/flushtlb.c index 18748b2bc8..2a70c5151b 100644 --- a/xen/arch/x86/flushtlb.c +++ b/xen/arch/x86/flushtlb.c @@ -286,11 +286,10 @@ void cache_flush(const void *addr, unsigned int size) * + prefix than a clflush + nop, and hence the prefix is added instead * of letting the alternative framework fill the gap by appending nops. */ - alternative_io("ds; clflush %[p]", - "data16 clflush %[p]", /* clflushopt */ - X86_FEATURE_CLFLUSHOPT, - /* no outputs */, - [p] "m" (*(const char *)(addr))); + alternative_input("ds clflush %[p]", + "data16 clflush %[p]", /* clflushopt */ + X86_FEATURE_CLFLUSHOPT, + [p] "m" (*(const char *)(addr))); } alternative_2("",