aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/kvm/vmx.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 46b29184a4d8..56c9bcc82836 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -2265,16 +2265,12 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
2265 asm( 2265 asm(
2266 /* Store host registers */ 2266 /* Store host registers */
2267#ifdef CONFIG_X86_64 2267#ifdef CONFIG_X86_64
2268 "push %%rax; push %%rbx; push %%rdx;" 2268 "push %%rdx; push %%rbp;"
2269 "push %%rsi; push %%rdi; push %%rbp;"
2270 "push %%r8; push %%r9; push %%r10; push %%r11;"
2271 "push %%r12; push %%r13; push %%r14; push %%r15;"
2272 "push %%rcx \n\t" 2269 "push %%rcx \n\t"
2273 ASM_VMX_VMWRITE_RSP_RDX "\n\t"
2274#else 2270#else
2275 "pusha; push %%ecx \n\t" 2271 "pusha; push %%ecx \n\t"
2276 ASM_VMX_VMWRITE_RSP_RDX "\n\t"
2277#endif 2272#endif
2273 ASM_VMX_VMWRITE_RSP_RDX "\n\t"
2278 /* Check if vmlaunch of vmresume is needed */ 2274 /* Check if vmlaunch of vmresume is needed */
2279 "cmp $0, %1 \n\t" 2275 "cmp $0, %1 \n\t"
2280 /* Load guest registers. Don't clobber flags. */ 2276 /* Load guest registers. Don't clobber flags. */
@@ -2333,12 +2329,8 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
2333 "mov %%r15, %c[r15](%3) \n\t" 2329 "mov %%r15, %c[r15](%3) \n\t"
2334 "mov %%cr2, %%rax \n\t" 2330 "mov %%cr2, %%rax \n\t"
2335 "mov %%rax, %c[cr2](%3) \n\t" 2331 "mov %%rax, %c[cr2](%3) \n\t"
2336 "mov (%%rsp), %3 \n\t"
2337 2332
2338 "pop %%rcx; pop %%r15; pop %%r14; pop %%r13; pop %%r12;" 2333 "pop %%rcx; pop %%rbp; pop %%rdx \n\t"
2339 "pop %%r11; pop %%r10; pop %%r9; pop %%r8;"
2340 "pop %%rbp; pop %%rdi; pop %%rsi;"
2341 "pop %%rdx; pop %%rbx; pop %%rax \n\t"
2342#else 2334#else
2343 "xchg %3, (%%esp) \n\t" 2335 "xchg %3, (%%esp) \n\t"
2344 "mov %%eax, %c[rax](%3) \n\t" 2336 "mov %%eax, %c[rax](%3) \n\t"
@@ -2376,7 +2368,12 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
2376 [r15]"i"(offsetof(struct kvm_vcpu, regs[VCPU_REGS_R15])), 2368 [r15]"i"(offsetof(struct kvm_vcpu, regs[VCPU_REGS_R15])),
2377#endif 2369#endif
2378 [cr2]"i"(offsetof(struct kvm_vcpu, cr2)) 2370 [cr2]"i"(offsetof(struct kvm_vcpu, cr2))
2379 : "cc", "memory"); 2371 : "cc", "memory"
2372#ifdef CONFIG_X86_64
2373 , "rbx", "rdi", "rsi"
2374 , "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
2375#endif
2376 );
2380 2377
2381 vcpu->interrupt_window_open = 2378 vcpu->interrupt_window_open =
2382 (vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & 3) == 0; 2379 (vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & 3) == 0;