Lines Matching refs:spapr

27 bool is_ram_address(SpaprMachineState *spapr, hwaddr addr)  in is_ram_address()  argument
29 MachineState *machine = MACHINE(spapr); in is_ram_address()
82 SpaprMachineState *spapr, in h_resize_hpt_prepare() argument
91 if (spapr->resize_hpt == SPAPR_RESIZE_HPT_DISABLED) { in h_resize_hpt_prepare()
95 if (!spapr->htab_shift) { in h_resize_hpt_prepare()
110 current_ram_size = MACHINE(spapr)->ram_size + get_plugged_memory_size(); in h_resize_hpt_prepare()
127 return vhyp_mmu_resize_hpt_prepare(cpu, spapr, shift); in h_resize_hpt_prepare()
146 void push_sregs_to_kvm_pr(SpaprMachineState *spapr) in push_sregs_to_kvm_pr() argument
155 if (!kvm_enabled() || !spapr->htab) { in push_sregs_to_kvm_pr()
165 SpaprMachineState *spapr, in h_resize_hpt_commit() argument
173 if (spapr->resize_hpt == SPAPR_RESIZE_HPT_DISABLED) { in h_resize_hpt_commit()
177 if (!spapr->htab_shift) { in h_resize_hpt_commit()
189 spapr->htab_shift = shift; in h_resize_hpt_commit()
197 return vhyp_mmu_resize_hpt_commit(cpu, spapr, flags, shift); in h_resize_hpt_commit()
205 static target_ulong h_set_sprg0(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_set_sprg0() argument
214 static target_ulong h_set_dabr(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_set_dabr() argument
232 static target_ulong h_set_xdabr(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_set_xdabr() argument
253 static target_ulong h_page_init(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_page_init() argument
271 if (!is_ram_address(spapr, dst) || (dst & ~TARGET_PAGE_MASK) != 0) { in h_page_init()
281 if (!is_ram_address(spapr, src) || (src & ~TARGET_PAGE_MASK) != 0) { in h_page_init()
447 static target_ulong h_register_vpa(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_register_vpa() argument
490 static target_ulong h_cede(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_cede() argument
537 static target_ulong h_join(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_join() argument
573 static target_ulong h_confer(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_confer() argument
628 static target_ulong h_prod(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_prod() argument
651 static target_ulong h_rtas(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_rtas() argument
659 return spapr_rtas_call(cpu, spapr, token, nargs, rtas_r3 + 12, in h_rtas()
663 static target_ulong h_logical_load(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_logical_load() argument
687 static target_ulong h_logical_store(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_logical_store() argument
713 static target_ulong h_logical_memop(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_logical_memop() argument
782 static target_ulong h_logical_icbi(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_logical_icbi() argument
789 static target_ulong h_logical_dcbf(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_logical_dcbf() argument
797 SpaprMachineState *spapr, in h_set_mode_resource_set_ciabr() argument
822 SpaprMachineState *spapr, in h_set_mode_resource_set_dawr0() argument
845 SpaprMachineState *spapr, in h_set_mode_resource_le() argument
860 spapr_pci_switch_vga(spapr, true); in h_set_mode_resource_le()
865 spapr_pci_switch_vga(spapr, false); in h_set_mode_resource_le()
873 SpaprMachineState *spapr, in h_set_mode_resource_addr_trans_mode() argument
896 if (!spapr_get_cap(spapr, SPAPR_CAP_AIL_MODE_3)) { in h_set_mode_resource_addr_trans_mode()
906 static target_ulong h_set_mode(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_set_mode() argument
914 ret = h_set_mode_resource_set_ciabr(cpu, spapr, args[0], args[2], in h_set_mode()
918 ret = h_set_mode_resource_set_dawr0(cpu, spapr, args[0], args[2], in h_set_mode()
922 ret = h_set_mode_resource_le(cpu, spapr, args[0], args[2], args[3]); in h_set_mode()
925 ret = h_set_mode_resource_addr_trans_mode(cpu, spapr, args[0], in h_set_mode()
933 static target_ulong h_clean_slb(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_clean_slb() argument
941 static target_ulong h_invalidate_pid(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_invalidate_pid() argument
949 static void spapr_check_setup_free_hpt(SpaprMachineState *spapr, in spapr_check_setup_free_hpt() argument
966 spapr_free_hpt(spapr); in spapr_check_setup_free_hpt()
969 spapr_setup_hpt(spapr); in spapr_check_setup_free_hpt()
982 SpaprMachineState *spapr, in h_register_process_table() argument
1039 cproc = spapr->patb_entry & PATE1_GR; in h_register_process_table()
1042 if (!(flags & FLAG_RADIX) != !(spapr->patb_entry & PATE1_GR)) { in h_register_process_table()
1046 cproc = spapr->patb_entry; in h_register_process_table()
1050 spapr_check_setup_free_hpt(spapr, spapr->patb_entry, cproc); in h_register_process_table()
1052 spapr->patb_entry = cproc; /* Save new process table */ in h_register_process_table()
1075 SpaprMachineState *spapr, in h_signal_sys_reset() argument
1153 SpaprMachineState *spapr, in do_client_architecture_support() argument
1165 uint32_t max_compat = spapr->max_compat_pvr; in do_client_architecture_support()
1244 int maxshift = spapr_hpt_shift_for_ramsize(MACHINE(spapr)->maxram_size); in do_client_architecture_support()
1246 if (spapr->resize_hpt == SPAPR_RESIZE_HPT_REQUIRED) { in do_client_architecture_support()
1252 if (spapr->htab_shift < maxshift) { in do_client_architecture_support()
1257 spapr_reallocate_hpt(spapr, maxshift, &error_fatal); in do_client_architecture_support()
1258 push_sregs_to_kvm_pr(spapr); in do_client_architecture_support()
1271 spapr_ovec_intersect(spapr->ov5_cas, spapr->ov5, ov5_guest); in do_client_architecture_support()
1276 spapr->cas_pre_isa3_guest = !spapr_ovec_test(ov1_guest, OV1_PPC_3_00); in do_client_architecture_support()
1283 spapr_numa_associativity_check(spapr); in do_client_architecture_support()
1290 if (!spapr->irq->xive) { in do_client_architecture_support()
1296 if (!spapr->irq->xics) { in do_client_architecture_support()
1303 spapr_irq_update_active_intc(spapr); in do_client_architecture_support()
1309 spapr_drc_reset_all(spapr); in do_client_architecture_support()
1310 spapr_clear_pending_hotplug_events(spapr); in do_client_architecture_support()
1316 if ((spapr->patb_entry & PATE1_GR) && !guest_radix) { in do_client_architecture_support()
1318 spapr_setup_hpt(spapr); in do_client_architecture_support()
1321 fdt = spapr_build_fdt(spapr, spapr->vof != NULL, fdt_bufsize); in do_client_architecture_support()
1322 g_free(spapr->fdt_blob); in do_client_architecture_support()
1323 spapr->fdt_size = fdt_totalsize(fdt); in do_client_architecture_support()
1324 spapr->fdt_initial_size = spapr->fdt_size; in do_client_architecture_support()
1325 spapr->fdt_blob = fdt; in do_client_architecture_support()
1333 MACHINE(spapr)->fdt = fdt; in do_client_architecture_support()
1339 SpaprMachineState *spapr, in h_client_architecture_support() argument
1357 ret = do_client_architecture_support(cpu, spapr, vec, fdt_bufsize); in h_client_architecture_support()
1359 _FDT((fdt_pack(spapr->fdt_blob))); in h_client_architecture_support()
1360 spapr->fdt_size = fdt_totalsize(spapr->fdt_blob); in h_client_architecture_support()
1361 spapr->fdt_initial_size = spapr->fdt_size; in h_client_architecture_support()
1364 cpu_physical_memory_write(fdt_buf + sizeof(hdr), spapr->fdt_blob, in h_client_architecture_support()
1365 spapr->fdt_size); in h_client_architecture_support()
1366 trace_spapr_cas_continue(spapr->fdt_size + sizeof(hdr)); in h_client_architecture_support()
1376 SpaprMachineState *spapr = SPAPR_MACHINE(ms); in spapr_vof_client_architecture_support() local
1378 target_ulong ret = do_client_architecture_support(POWERPC_CPU(cs), spapr, in spapr_vof_client_architecture_support()
1386 spapr_vof_client_dt_finalize(spapr, spapr->fdt_blob); in spapr_vof_client_architecture_support()
1392 SpaprMachineState *spapr, in h_get_cpu_characteristics() argument
1399 uint8_t safe_cache = spapr_get_cap(spapr, SPAPR_CAP_CFPC); in h_get_cpu_characteristics()
1400 uint8_t safe_bounds_check = spapr_get_cap(spapr, SPAPR_CAP_SBBC); in h_get_cpu_characteristics()
1401 uint8_t safe_indirect_branch = spapr_get_cap(spapr, SPAPR_CAP_IBS); in h_get_cpu_characteristics()
1402 uint8_t count_cache_flush_assist = spapr_get_cap(spapr, in h_get_cpu_characteristics()
1460 static target_ulong h_update_dt(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_update_dt() argument
1466 SpaprMachineClass *smc = SPAPR_MACHINE_GET_CLASS(spapr); in h_update_dt()
1477 if (cb > spapr->fdt_initial_size * 2) { in h_update_dt()
1478 trace_spapr_update_dt_failed_size(spapr->fdt_initial_size, cb, in h_update_dt()
1488 trace_spapr_update_dt_failed_check(spapr->fdt_initial_size, cb, in h_update_dt()
1493 g_free(spapr->fdt_blob); in h_update_dt()
1494 spapr->fdt_size = cb; in h_update_dt()
1495 spapr->fdt_blob = fdt; in h_update_dt()
1553 SpaprMachineState *spapr = SPAPR_MACHINE(qdev_get_machine()); in spapr_hypercall() local
1560 return fn(cpu, spapr, opcode, args); in spapr_hypercall()
1567 return fn(cpu, spapr, opcode, args); in spapr_hypercall()
1574 return fn(cpu, spapr, opcode, args); in spapr_hypercall()
1589 static target_ulong h_softmmu(PowerPCCPU *cpu, SpaprMachineState *spapr, in h_softmmu() argument