Skip to contentSkip to conversation

KVM: x86: Use VMCALL and VMMCALL mnemonics in kvm_para.h

PATCH Applied Uros Bizjak 2 participants 2 messages Jun 23, 2020 – Jun 25, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: x86: Use VMCALL and VMMCALL mnemonics in kvm_para.h

Current minimum required version of binutils is 2.23, which supports VMCALL and VMMCALL instruction mnemonics.

Replace the byte-wise specification of VMCALL and VMMCALL with these proper mnemonics.

---
 arch/x86/include/asm/kvm_para.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/kvm_para.h +1 -1
index 49d3a9edb06f..01317493807e 100644
@@ -18,7 +18,7 @@ static inline bool kvm_check_and_clear_guest_paused(void)
 #endif /* CONFIG_KVM_GUEST */
 
 #define KVM_HYPERCALL \
-        ALTERNATIVE(".byte 0x0f,0x01,0xc1", ".byte 0x0f,0x01,0xd9", X86_FEATURE_VMMCALL)
+        ALTERNATIVE("vmcall", "vmmcall", X86_FEATURE_VMMCALL)
 
 /* For KVM hypercalls, a three-byte sequence of either the vmcall or the vmmcall
  * instruction.  The hypervisor may replace it with something else but only the
Signature · 1 line
2.26.2
maintainer Applied
#1 lore raw
Quoted 18 lines · Uros Bizjak

Current minimum required version of binutils is 2.23, which supports VMCALL and VMMCALL instruction mnemonics.

Replace the byte-wise specification of VMCALL and VMMCALL with these proper mnemonics.

---
 arch/x86/include/asm/kvm_para.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/kvm_para.h +0 -0
index 49d3a9edb06f..01317493807e 100644

arch/x86/include/asm/kvm_para.h static inline bool kvm_check_and_clear_guest_paused(void) · line 24

Quoted 8 lines
arch/x86/include/asm/kvm_para.h +1 -1
@@ -18,7 +18,7 @@ static inline bool kvm_check_and_clear_guest_paused(void)
 #endif /* CONFIG_KVM_GUEST */
 
 #define KVM_HYPERCALL \
-        ALTERNATIVE(".byte 0x0f,0x01,0xc1", ".byte 0x0f,0x01,0xd9", X86_FEATURE_VMMCALL)
+        ALTERNATIVE("vmcall", "vmmcall", X86_FEATURE_VMMCALL)
 
 /* For KVM hypercalls, a three-byte sequence of either the vmcall or the vmmcall
  * instruction.  The hypervisor may replace it with something else but only the

Queued, thanks.