Skip to contentSkip to conversation

KVM: VMX: remove unneeded 'asm volatile ("")' from vmcs_write64

PATCH Applied Uros Bizjak 2 participants 2 messages Jun 2, 2019 – Jun 4, 2019

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

PATCH 1/1 KVM: VMX: remove unneeded 'asm volatile ("")' from vmcs_write64

__vmcs_writel uses volatile asm, so there is no need to insert another one between the first and the second call to __vmcs_writel in order to prevent unwanted code moves for 32bit targets.

---
 arch/x86/kvm/vmx/ops.h | 1 -
 1 file changed, 1 deletion(-)
arch/x86/kvm/vmx/ops.h +0 -1
index b8e50f76fefc..2200fb698dd0 100644
@@ -146,7 +146,6 @@ static __always_inline void vmcs_write64(unsigned long field, u64 value)
 
 	__vmcs_writel(field, value);
 #ifndef CONFIG_X86_64
-	asm volatile ("");
 	__vmcs_writel(field+1, value >> 32);
 #endif
 }
Signature · 1 line
2.21.0
maintainer Applied
#1 lore raw
Quoted 15 lines · Uros Bizjak

__vmcs_writel uses volatile asm, so there is no need to insert another one between the first and the second call to __vmcs_writel in order to prevent unwanted code moves for 32bit targets.

---
 arch/x86/kvm/vmx/ops.h | 1 -
 1 file changed, 1 deletion(-)
arch/x86/kvm/vmx/ops.h +0 -0
index b8e50f76fefc..2200fb698dd0 100644

arch/x86/kvm/vmx/ops.h static __always_inline void vmcs_write64(unsigned long field, u64 value) · line 151

Quoted 7 lines
arch/x86/kvm/vmx/ops.h +0 -1
@@ -146,7 +146,6 @@ static __always_inline void vmcs_write64(unsigned long field, u64 value)
 
 	__vmcs_writel(field, value);
 #ifndef CONFIG_X86_64
-	asm volatile ("");
 	__vmcs_writel(field+1, value >> 32);
 #endif
 }

Queued, thanks.

Paolo