]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
x86: Remove guest registers parameter from vcpu_handle_exit
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 3 Apr 2015 12:44:43 +0000 (14:44 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Fri, 10 Apr 2015 07:00:52 +0000 (09:00 +0200)
We can retrieve them from the per-cpu data structure now.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/x86/include/asm/vcpu.h
hypervisor/arch/x86/svm-vmexit.S
hypervisor/arch/x86/svm.c
hypervisor/arch/x86/vmx-vmexit.S
hypervisor/arch/x86/vmx.c

index 8dd048ffa80e5479e50f25f082583a7636a84ec9..cce0f5fdf066b2da4e12b8a5f5022fdb11ed4a10 100644 (file)
@@ -70,7 +70,7 @@ void __attribute__((noreturn)) vcpu_activate_vmm(struct per_cpu *cpu_data);
 void __attribute__((noreturn))
 vcpu_deactivate_vmm(union registers *guest_regs);
 
-void vcpu_handle_exit(union registers *guest_regs, struct per_cpu *cpu_data);
+void vcpu_handle_exit(struct per_cpu *cpu_data);
 
 void vcpu_park(void);
 
index c20193e9b2e3ffbd48481a84e41a2703e643a5f0..f374b37ffca04b33fa3585a8e4f2bb7554673106 100644 (file)
@@ -35,8 +35,7 @@ svm_vmexit:
        push %r14
        push %r15
 
-       mov %rsp,%rdi
-       lea -PERCPU_STACK_END+16*8(%rsp),%rsi
+       lea -PERCPU_STACK_END+16*8(%rsp),%rdi
        push %rax
        call vcpu_handle_exit
        pop %rax
index ef7773a51872691082c288db6eb0d76d0499d984..9c09c0e08eba533d28916990dc6c083397c22730 100644 (file)
@@ -915,8 +915,9 @@ void vcpu_vendor_get_mmio_intercept(struct vcpu_mmio_intercept *mmio)
        mmio->is_write = !!(vmcb->exitinfo1 & 0x2);
 }
 
-void vcpu_handle_exit(union registers *guest_regs, struct per_cpu *cpu_data)
+void vcpu_handle_exit(struct per_cpu *cpu_data)
 {
+       union registers *guest_regs = &cpu_data->guest_regs;
        struct vmcb *vmcb = &cpu_data->vmcb;
        bool res = false;
        int sipi_vector;
index a82fd278cec2216d6e2ac37e05eaf59bee094ece..19402ef3eb9b23a542856c52fdf7befe26b135b4 100644 (file)
@@ -32,8 +32,7 @@ vmx_vmexit:
        push %r14
        push %r15
 
-       mov %rsp,%rdi
-       lea -PERCPU_STACK_END+16*8(%rsp),%rsi
+       lea -PERCPU_STACK_END+16*8(%rsp),%rdi
        call vcpu_handle_exit
 
        pop %r15
index b8e8c19ee3223a875bbcfd00c9c5b8a329331433..1bbc64a337e8eced293acfda8eaacbe3daae631f 100644 (file)
@@ -1038,8 +1038,9 @@ void vcpu_vendor_get_mmio_intercept(struct vcpu_mmio_intercept *mmio)
        mmio->is_write = !!(exitq & 0x2);
 }
 
-void vcpu_handle_exit(union registers *guest_regs, struct per_cpu *cpu_data)
+void vcpu_handle_exit(struct per_cpu *cpu_data)
 {
+       union registers *guest_regs = &cpu_data->guest_regs;
        u32 reason = vmcs_read32(VM_EXIT_REASON);
        int sipi_vector;