Lines Matching refs:host_ctxt

24 void __kvm_hyp_host_forward_smc(struct kvm_cpu_context *host_ctxt);
142 static void handle___kvm_vcpu_run(struct kvm_cpu_context *host_ctxt) in handle___kvm_vcpu_run() argument
144 DECLARE_REG(struct kvm_vcpu *, host_vcpu, host_ctxt, 1); in handle___kvm_vcpu_run()
184 cpu_reg(host_ctxt, 1) = ret; in handle___kvm_vcpu_run()
187 static void handle___kvm_adjust_pc(struct kvm_cpu_context *host_ctxt) in handle___kvm_adjust_pc() argument
189 DECLARE_REG(struct kvm_vcpu *, vcpu, host_ctxt, 1); in handle___kvm_adjust_pc()
194 static void handle___kvm_flush_vm_context(struct kvm_cpu_context *host_ctxt) in handle___kvm_flush_vm_context() argument
199 static void handle___kvm_tlb_flush_vmid_ipa(struct kvm_cpu_context *host_ctxt) in handle___kvm_tlb_flush_vmid_ipa() argument
201 DECLARE_REG(struct kvm_s2_mmu *, mmu, host_ctxt, 1); in handle___kvm_tlb_flush_vmid_ipa()
202 DECLARE_REG(phys_addr_t, ipa, host_ctxt, 2); in handle___kvm_tlb_flush_vmid_ipa()
203 DECLARE_REG(int, level, host_ctxt, 3); in handle___kvm_tlb_flush_vmid_ipa()
208 static void handle___kvm_tlb_flush_vmid_ipa_nsh(struct kvm_cpu_context *host_ctxt) in handle___kvm_tlb_flush_vmid_ipa_nsh() argument
210 DECLARE_REG(struct kvm_s2_mmu *, mmu, host_ctxt, 1); in handle___kvm_tlb_flush_vmid_ipa_nsh()
211 DECLARE_REG(phys_addr_t, ipa, host_ctxt, 2); in handle___kvm_tlb_flush_vmid_ipa_nsh()
212 DECLARE_REG(int, level, host_ctxt, 3); in handle___kvm_tlb_flush_vmid_ipa_nsh()
218 handle___kvm_tlb_flush_vmid_range(struct kvm_cpu_context *host_ctxt) in handle___kvm_tlb_flush_vmid_range() argument
220 DECLARE_REG(struct kvm_s2_mmu *, mmu, host_ctxt, 1); in handle___kvm_tlb_flush_vmid_range()
221 DECLARE_REG(phys_addr_t, start, host_ctxt, 2); in handle___kvm_tlb_flush_vmid_range()
222 DECLARE_REG(unsigned long, pages, host_ctxt, 3); in handle___kvm_tlb_flush_vmid_range()
227 static void handle___kvm_tlb_flush_vmid(struct kvm_cpu_context *host_ctxt) in handle___kvm_tlb_flush_vmid() argument
229 DECLARE_REG(struct kvm_s2_mmu *, mmu, host_ctxt, 1); in handle___kvm_tlb_flush_vmid()
234 static void handle___kvm_flush_cpu_context(struct kvm_cpu_context *host_ctxt) in handle___kvm_flush_cpu_context() argument
236 DECLARE_REG(struct kvm_s2_mmu *, mmu, host_ctxt, 1); in handle___kvm_flush_cpu_context()
241 static void handle___kvm_timer_set_cntvoff(struct kvm_cpu_context *host_ctxt) in handle___kvm_timer_set_cntvoff() argument
243 __kvm_timer_set_cntvoff(cpu_reg(host_ctxt, 1)); in handle___kvm_timer_set_cntvoff()
246 static void handle___kvm_enable_ssbs(struct kvm_cpu_context *host_ctxt) in handle___kvm_enable_ssbs() argument
255 static void handle___vgic_v3_get_gic_config(struct kvm_cpu_context *host_ctxt) in handle___vgic_v3_get_gic_config() argument
257 cpu_reg(host_ctxt, 1) = __vgic_v3_get_gic_config(); in handle___vgic_v3_get_gic_config()
260 static void handle___vgic_v3_init_lrs(struct kvm_cpu_context *host_ctxt) in handle___vgic_v3_init_lrs() argument
265 static void handle___kvm_get_mdcr_el2(struct kvm_cpu_context *host_ctxt) in handle___kvm_get_mdcr_el2() argument
267 cpu_reg(host_ctxt, 1) = __kvm_get_mdcr_el2(); in handle___kvm_get_mdcr_el2()
270 static void handle___vgic_v3_save_vmcr_aprs(struct kvm_cpu_context *host_ctxt) in handle___vgic_v3_save_vmcr_aprs() argument
272 DECLARE_REG(struct vgic_v3_cpu_if *, cpu_if, host_ctxt, 1); in handle___vgic_v3_save_vmcr_aprs()
277 static void handle___vgic_v3_restore_vmcr_aprs(struct kvm_cpu_context *host_ctxt) in handle___vgic_v3_restore_vmcr_aprs() argument
279 DECLARE_REG(struct vgic_v3_cpu_if *, cpu_if, host_ctxt, 1); in handle___vgic_v3_restore_vmcr_aprs()
284 static void handle___pkvm_init(struct kvm_cpu_context *host_ctxt) in handle___pkvm_init() argument
286 DECLARE_REG(phys_addr_t, phys, host_ctxt, 1); in handle___pkvm_init()
287 DECLARE_REG(unsigned long, size, host_ctxt, 2); in handle___pkvm_init()
288 DECLARE_REG(unsigned long, nr_cpus, host_ctxt, 3); in handle___pkvm_init()
289 DECLARE_REG(unsigned long *, per_cpu_base, host_ctxt, 4); in handle___pkvm_init()
290 DECLARE_REG(u32, hyp_va_bits, host_ctxt, 5); in handle___pkvm_init()
297 cpu_reg(host_ctxt, 1) = __pkvm_init(phys, size, nr_cpus, per_cpu_base, in handle___pkvm_init()
301 static void handle___pkvm_cpu_set_vector(struct kvm_cpu_context *host_ctxt) in handle___pkvm_cpu_set_vector() argument
303 DECLARE_REG(enum arm64_hyp_spectre_vector, slot, host_ctxt, 1); in handle___pkvm_cpu_set_vector()
305 cpu_reg(host_ctxt, 1) = pkvm_cpu_set_vector(slot); in handle___pkvm_cpu_set_vector()
308 static void handle___pkvm_host_share_hyp(struct kvm_cpu_context *host_ctxt) in handle___pkvm_host_share_hyp() argument
310 DECLARE_REG(u64, pfn, host_ctxt, 1); in handle___pkvm_host_share_hyp()
312 cpu_reg(host_ctxt, 1) = __pkvm_host_share_hyp(pfn); in handle___pkvm_host_share_hyp()
315 static void handle___pkvm_host_unshare_hyp(struct kvm_cpu_context *host_ctxt) in handle___pkvm_host_unshare_hyp() argument
317 DECLARE_REG(u64, pfn, host_ctxt, 1); in handle___pkvm_host_unshare_hyp()
319 cpu_reg(host_ctxt, 1) = __pkvm_host_unshare_hyp(pfn); in handle___pkvm_host_unshare_hyp()
322 static void handle___pkvm_create_private_mapping(struct kvm_cpu_context *host_ctxt) in handle___pkvm_create_private_mapping() argument
324 DECLARE_REG(phys_addr_t, phys, host_ctxt, 1); in handle___pkvm_create_private_mapping()
325 DECLARE_REG(size_t, size, host_ctxt, 2); in handle___pkvm_create_private_mapping()
326 DECLARE_REG(enum kvm_pgtable_prot, prot, host_ctxt, 3); in handle___pkvm_create_private_mapping()
344 cpu_reg(host_ctxt, 1) = haddr; in handle___pkvm_create_private_mapping()
347 static void handle___pkvm_prot_finalize(struct kvm_cpu_context *host_ctxt) in handle___pkvm_prot_finalize() argument
349 cpu_reg(host_ctxt, 1) = __pkvm_prot_finalize(); in handle___pkvm_prot_finalize()
352 static void handle___pkvm_vcpu_init_traps(struct kvm_cpu_context *host_ctxt) in handle___pkvm_vcpu_init_traps() argument
354 DECLARE_REG(struct kvm_vcpu *, vcpu, host_ctxt, 1); in handle___pkvm_vcpu_init_traps()
359 static void handle___pkvm_init_vm(struct kvm_cpu_context *host_ctxt) in handle___pkvm_init_vm() argument
361 DECLARE_REG(struct kvm *, host_kvm, host_ctxt, 1); in handle___pkvm_init_vm()
362 DECLARE_REG(unsigned long, vm_hva, host_ctxt, 2); in handle___pkvm_init_vm()
363 DECLARE_REG(unsigned long, pgd_hva, host_ctxt, 3); in handle___pkvm_init_vm()
366 cpu_reg(host_ctxt, 1) = __pkvm_init_vm(host_kvm, vm_hva, pgd_hva); in handle___pkvm_init_vm()
369 static void handle___pkvm_init_vcpu(struct kvm_cpu_context *host_ctxt) in handle___pkvm_init_vcpu() argument
371 DECLARE_REG(pkvm_handle_t, handle, host_ctxt, 1); in handle___pkvm_init_vcpu()
372 DECLARE_REG(struct kvm_vcpu *, host_vcpu, host_ctxt, 2); in handle___pkvm_init_vcpu()
373 DECLARE_REG(unsigned long, vcpu_hva, host_ctxt, 3); in handle___pkvm_init_vcpu()
376 cpu_reg(host_ctxt, 1) = __pkvm_init_vcpu(handle, host_vcpu, vcpu_hva); in handle___pkvm_init_vcpu()
379 static void handle___pkvm_teardown_vm(struct kvm_cpu_context *host_ctxt) in handle___pkvm_teardown_vm() argument
381 DECLARE_REG(pkvm_handle_t, handle, host_ctxt, 1); in handle___pkvm_teardown_vm()
383 cpu_reg(host_ctxt, 1) = __pkvm_teardown_vm(handle); in handle___pkvm_teardown_vm()
420 static void handle_host_hcall(struct kvm_cpu_context *host_ctxt) in handle_host_hcall() argument
422 DECLARE_REG(unsigned long, id, host_ctxt, 0); in handle_host_hcall()
448 cpu_reg(host_ctxt, 0) = SMCCC_RET_SUCCESS; in handle_host_hcall()
449 hfn(host_ctxt); in handle_host_hcall()
453 cpu_reg(host_ctxt, 0) = SMCCC_RET_NOT_SUPPORTED; in handle_host_hcall()
456 static void default_host_smc_handler(struct kvm_cpu_context *host_ctxt) in default_host_smc_handler() argument
458 __kvm_hyp_host_forward_smc(host_ctxt); in default_host_smc_handler()
461 static void handle_host_smc(struct kvm_cpu_context *host_ctxt) in handle_host_smc() argument
463 DECLARE_REG(u64, func_id, host_ctxt, 0); in handle_host_smc()
468 handled = kvm_host_psci_handler(host_ctxt, func_id); in handle_host_smc()
470 handled = kvm_host_ffa_handler(host_ctxt, func_id); in handle_host_smc()
472 default_host_smc_handler(host_ctxt); in handle_host_smc()
478 void handle_trap(struct kvm_cpu_context *host_ctxt) in handle_trap() argument
484 handle_host_hcall(host_ctxt); in handle_trap()
487 handle_host_smc(host_ctxt); in handle_trap()
497 handle_host_mem_abort(host_ctxt); in handle_trap()