Lines Matching refs:host_ctxt

20 void __noreturn __host_enter(struct kvm_cpu_context *host_ctxt);
72 static unsigned long psci_forward(struct kvm_cpu_context *host_ctxt) in psci_forward() argument
74 return psci_call(cpu_reg(host_ctxt, 0), cpu_reg(host_ctxt, 1), in psci_forward()
75 cpu_reg(host_ctxt, 2), cpu_reg(host_ctxt, 3)); in psci_forward()
107 static int psci_cpu_on(u64 func_id, struct kvm_cpu_context *host_ctxt) in psci_cpu_on() argument
109 DECLARE_REG(u64, mpidr, host_ctxt, 1); in psci_cpu_on()
110 DECLARE_REG(unsigned long, pc, host_ctxt, 2); in psci_cpu_on()
111 DECLARE_REG(unsigned long, r0, host_ctxt, 3); in psci_cpu_on()
151 static int psci_cpu_suspend(u64 func_id, struct kvm_cpu_context *host_ctxt) in psci_cpu_suspend() argument
153 DECLARE_REG(u64, power_state, host_ctxt, 1); in psci_cpu_suspend()
154 DECLARE_REG(unsigned long, pc, host_ctxt, 2); in psci_cpu_suspend()
155 DECLARE_REG(unsigned long, r0, host_ctxt, 3); in psci_cpu_suspend()
179 static int psci_system_suspend(u64 func_id, struct kvm_cpu_context *host_ctxt) in psci_system_suspend() argument
181 DECLARE_REG(unsigned long, pc, host_ctxt, 1); in psci_system_suspend()
182 DECLARE_REG(unsigned long, r0, host_ctxt, 2); in psci_system_suspend()
206 struct kvm_cpu_context *host_ctxt; in __kvm_host_psci_cpu_entry() local
208 host_ctxt = host_data_ptr(host_ctxt); in __kvm_host_psci_cpu_entry()
215 cpu_reg(host_ctxt, 0) = boot_args->r0; in __kvm_host_psci_cpu_entry()
221 __host_enter(host_ctxt); in __kvm_host_psci_cpu_entry()
224 static unsigned long psci_0_1_handler(u64 func_id, struct kvm_cpu_context *host_ctxt) in psci_0_1_handler() argument
227 return psci_forward(host_ctxt); in psci_0_1_handler()
229 return psci_cpu_on(func_id, host_ctxt); in psci_0_1_handler()
231 return psci_cpu_suspend(func_id, host_ctxt); in psci_0_1_handler()
236 static unsigned long psci_0_2_handler(u64 func_id, struct kvm_cpu_context *host_ctxt) in psci_0_2_handler() argument
245 return psci_forward(host_ctxt); in psci_0_2_handler()
252 return psci_forward(host_ctxt); in psci_0_2_handler()
254 return psci_cpu_suspend(func_id, host_ctxt); in psci_0_2_handler()
256 return psci_cpu_on(func_id, host_ctxt); in psci_0_2_handler()
262 static unsigned long psci_1_0_handler(u64 func_id, struct kvm_cpu_context *host_ctxt) in psci_1_0_handler() argument
268 return psci_forward(host_ctxt); in psci_1_0_handler()
270 return psci_system_suspend(func_id, host_ctxt); in psci_1_0_handler()
272 return psci_0_2_handler(func_id, host_ctxt); in psci_1_0_handler()
276 bool kvm_host_psci_handler(struct kvm_cpu_context *host_ctxt, u32 func_id) in kvm_host_psci_handler() argument
284 ret = psci_0_1_handler(func_id, host_ctxt); in kvm_host_psci_handler()
289 ret = psci_0_2_handler(func_id, host_ctxt); in kvm_host_psci_handler()
294 ret = psci_1_0_handler(func_id, host_ctxt); in kvm_host_psci_handler()
298 cpu_reg(host_ctxt, 0) = ret; in kvm_host_psci_handler()
299 cpu_reg(host_ctxt, 1) = 0; in kvm_host_psci_handler()
300 cpu_reg(host_ctxt, 2) = 0; in kvm_host_psci_handler()
301 cpu_reg(host_ctxt, 3) = 0; in kvm_host_psci_handler()