Lines Matching defs:host_ctxt

24 void __kvm_hyp_host_forward_smc(struct kvm_cpu_context *host_ctxt);
74 static void handle___kvm_vcpu_run(struct kvm_cpu_context *host_ctxt)
76 DECLARE_REG(struct kvm_vcpu *, host_vcpu, host_ctxt, 1);
105 cpu_reg(host_ctxt, 1) = ret;
108 static void handle___kvm_adjust_pc(struct kvm_cpu_context *host_ctxt)
110 DECLARE_REG(struct kvm_vcpu *, vcpu, host_ctxt, 1);
115 static void handle___kvm_flush_vm_context(struct kvm_cpu_context *host_ctxt)
120 static void handle___kvm_tlb_flush_vmid_ipa(struct kvm_cpu_context *host_ctxt)
122 DECLARE_REG(struct kvm_s2_mmu *, mmu, host_ctxt, 1);
123 DECLARE_REG(phys_addr_t, ipa, host_ctxt, 2);
124 DECLARE_REG(int, level, host_ctxt, 3);
129 static void handle___kvm_tlb_flush_vmid_ipa_nsh(struct kvm_cpu_context *host_ctxt)
131 DECLARE_REG(struct kvm_s2_mmu *, mmu, host_ctxt, 1);
132 DECLARE_REG(phys_addr_t, ipa, host_ctxt, 2);
133 DECLARE_REG(int, level, host_ctxt, 3);
139 handle___kvm_tlb_flush_vmid_range(struct kvm_cpu_context *host_ctxt)
141 DECLARE_REG(struct kvm_s2_mmu *, mmu, host_ctxt, 1);
142 DECLARE_REG(phys_addr_t, start, host_ctxt, 2);
143 DECLARE_REG(unsigned long, pages, host_ctxt, 3);
148 static void handle___kvm_tlb_flush_vmid(struct kvm_cpu_context *host_ctxt)
150 DECLARE_REG(struct kvm_s2_mmu *, mmu, host_ctxt, 1);
155 static void handle___kvm_flush_cpu_context(struct kvm_cpu_context *host_ctxt)
157 DECLARE_REG(struct kvm_s2_mmu *, mmu, host_ctxt, 1);
162 static void handle___kvm_timer_set_cntvoff(struct kvm_cpu_context *host_ctxt)
164 __kvm_timer_set_cntvoff(cpu_reg(host_ctxt, 1));
167 static void handle___kvm_enable_ssbs(struct kvm_cpu_context *host_ctxt)
176 static void handle___vgic_v3_get_gic_config(struct kvm_cpu_context *host_ctxt)
178 cpu_reg(host_ctxt, 1) = __vgic_v3_get_gic_config();
181 static void handle___vgic_v3_read_vmcr(struct kvm_cpu_context *host_ctxt)
183 cpu_reg(host_ctxt, 1) = __vgic_v3_read_vmcr();
186 static void handle___vgic_v3_write_vmcr(struct kvm_cpu_context *host_ctxt)
188 __vgic_v3_write_vmcr(cpu_reg(host_ctxt, 1));
191 static void handle___vgic_v3_init_lrs(struct kvm_cpu_context *host_ctxt)
196 static void handle___kvm_get_mdcr_el2(struct kvm_cpu_context *host_ctxt)
198 cpu_reg(host_ctxt, 1) = __kvm_get_mdcr_el2();
201 static void handle___vgic_v3_save_aprs(struct kvm_cpu_context *host_ctxt)
203 DECLARE_REG(struct vgic_v3_cpu_if *, cpu_if, host_ctxt, 1);
208 static void handle___vgic_v3_restore_aprs(struct kvm_cpu_context *host_ctxt)
210 DECLARE_REG(struct vgic_v3_cpu_if *, cpu_if, host_ctxt, 1);
215 static void handle___pkvm_init(struct kvm_cpu_context *host_ctxt)
217 DECLARE_REG(phys_addr_t, phys, host_ctxt, 1);
218 DECLARE_REG(unsigned long, size, host_ctxt, 2);
219 DECLARE_REG(unsigned long, nr_cpus, host_ctxt, 3);
220 DECLARE_REG(unsigned long *, per_cpu_base, host_ctxt, 4);
221 DECLARE_REG(u32, hyp_va_bits, host_ctxt, 5);
228 cpu_reg(host_ctxt, 1) = __pkvm_init(phys, size, nr_cpus, per_cpu_base,
232 static void handle___pkvm_cpu_set_vector(struct kvm_cpu_context *host_ctxt)
234 DECLARE_REG(enum arm64_hyp_spectre_vector, slot, host_ctxt, 1);
236 cpu_reg(host_ctxt, 1) = pkvm_cpu_set_vector(slot);
239 static void handle___pkvm_host_share_hyp(struct kvm_cpu_context *host_ctxt)
241 DECLARE_REG(u64, pfn, host_ctxt, 1);
243 cpu_reg(host_ctxt, 1) = __pkvm_host_share_hyp(pfn);
246 static void handle___pkvm_host_unshare_hyp(struct kvm_cpu_context *host_ctxt)
248 DECLARE_REG(u64, pfn, host_ctxt, 1);
250 cpu_reg(host_ctxt, 1) = __pkvm_host_unshare_hyp(pfn);
253 static void handle___pkvm_create_private_mapping(struct kvm_cpu_context *host_ctxt)
255 DECLARE_REG(phys_addr_t, phys, host_ctxt, 1);
256 DECLARE_REG(size_t, size, host_ctxt, 2);
257 DECLARE_REG(enum kvm_pgtable_prot, prot, host_ctxt, 3);
275 cpu_reg(host_ctxt, 1) = haddr;
278 static void handle___pkvm_prot_finalize(struct kvm_cpu_context *host_ctxt)
280 cpu_reg(host_ctxt, 1) = __pkvm_prot_finalize();
283 static void handle___pkvm_vcpu_init_traps(struct kvm_cpu_context *host_ctxt)
285 DECLARE_REG(struct kvm_vcpu *, vcpu, host_ctxt, 1);
290 static void handle___pkvm_init_vm(struct kvm_cpu_context *host_ctxt)
292 DECLARE_REG(struct kvm *, host_kvm, host_ctxt, 1);
293 DECLARE_REG(unsigned long, vm_hva, host_ctxt, 2);
294 DECLARE_REG(unsigned long, pgd_hva, host_ctxt, 3);
297 cpu_reg(host_ctxt, 1) = __pkvm_init_vm(host_kvm, vm_hva, pgd_hva);
300 static void handle___pkvm_init_vcpu(struct kvm_cpu_context *host_ctxt)
302 DECLARE_REG(pkvm_handle_t, handle, host_ctxt, 1);
303 DECLARE_REG(struct kvm_vcpu *, host_vcpu, host_ctxt, 2);
304 DECLARE_REG(unsigned long, vcpu_hva, host_ctxt, 3);
307 cpu_reg(host_ctxt, 1) = __pkvm_init_vcpu(handle, host_vcpu, vcpu_hva);
310 static void handle___pkvm_teardown_vm(struct kvm_cpu_context *host_ctxt)
312 DECLARE_REG(pkvm_handle_t, handle, host_ctxt, 1);
314 cpu_reg(host_ctxt, 1) = __pkvm_teardown_vm(handle);
353 static void handle_host_hcall(struct kvm_cpu_context *host_ctxt)
355 DECLARE_REG(unsigned long, id, host_ctxt, 0);
381 cpu_reg(host_ctxt, 0) = SMCCC_RET_SUCCESS;
382 hfn(host_ctxt);
386 cpu_reg(host_ctxt, 0) = SMCCC_RET_NOT_SUPPORTED;
389 static void default_host_smc_handler(struct kvm_cpu_context *host_ctxt)
391 __kvm_hyp_host_forward_smc(host_ctxt);
394 static void handle_host_smc(struct kvm_cpu_context *host_ctxt)
396 DECLARE_REG(u64, func_id, host_ctxt, 0);
401 handled = kvm_host_psci_handler(host_ctxt, func_id);
403 handled = kvm_host_ffa_handler(host_ctxt, func_id);
405 default_host_smc_handler(host_ctxt);
411 void handle_trap(struct kvm_cpu_context *host_ctxt)
417 handle_host_hcall(host_ctxt);
420 handle_host_smc(host_ctxt);
433 handle_host_mem_abort(host_ctxt);