Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'kvm-x86-vmx-7.1' of https://github.com/kvm-x86/linux into HEAD

KVM VMX changes for 7.1

- Drop obsolete (largely ignored by hardwre) branch hint prefixes from the
VMX instruction macros, as saving a byte of code per instruction provides
more benefits than the (mostly) superfluous prefixes.

- Use ASM_INPUT_RM() in __vmcs_writel() to coerce clang into using a register
input when appropriate.

- Drop unnecessary parentheses in cpu_has_load_cet_ctrl() so as not to suggest
that "return (x & y);" is KVM's preferred style.

+2 -5
+1 -1
arch/x86/kvm/vmx/capabilities.h
··· 107 107 108 108 static inline bool cpu_has_load_cet_ctrl(void) 109 109 { 110 - return (vmcs_config.vmentry_ctrl & VM_ENTRY_LOAD_CET_STATE); 110 + return vmcs_config.vmentry_ctrl & VM_ENTRY_LOAD_CET_STATE; 111 111 } 112 112 113 113 static inline bool cpu_has_save_perf_global_ctrl(void)
+1 -4
arch/x86/kvm/vmx/vmx_ops.h
··· 119 119 #else /* !CONFIG_CC_HAS_ASM_GOTO_OUTPUT */ 120 120 121 121 asm volatile("1: vmread %[field], %[output]\n\t" 122 - ".byte 0x3e\n\t" /* branch taken hint */ 123 122 "ja 3f\n\t" 124 123 125 124 /* ··· 190 191 #define vmx_asm1(insn, op1, error_args...) \ 191 192 do { \ 192 193 asm goto("1: " __stringify(insn) " %0\n\t" \ 193 - ".byte 0x2e\n\t" /* branch not taken hint */ \ 194 194 "jna %l[error]\n\t" \ 195 195 _ASM_EXTABLE(1b, %l[fault]) \ 196 196 : : op1 : "cc" : error, fault); \ ··· 206 208 #define vmx_asm2(insn, op1, op2, error_args...) \ 207 209 do { \ 208 210 asm goto("1: " __stringify(insn) " %1, %0\n\t" \ 209 - ".byte 0x2e\n\t" /* branch not taken hint */ \ 210 211 "jna %l[error]\n\t" \ 211 212 _ASM_EXTABLE(1b, %l[fault]) \ 212 213 : : op1, op2 : "cc" : error, fault); \ ··· 221 224 222 225 static __always_inline void __vmcs_writel(unsigned long field, unsigned long value) 223 226 { 224 - vmx_asm2(vmwrite, "r"(field), "rm"(value), field, value); 227 + vmx_asm2(vmwrite, "r" (field), ASM_INPUT_RM (value), field, value); 225 228 } 226 229 227 230 static __always_inline void vmcs_write16(unsigned long field, u16 value)