Lines Matching refs:arch
60 kvm->arch.pv.handle = 0; in kvm_s390_clear_pv_state()
61 kvm->arch.pv.guest_len = 0; in kvm_s390_clear_pv_state()
62 kvm->arch.pv.stor_base = 0; in kvm_s390_clear_pv_state()
63 kvm->arch.pv.stor_var = NULL; in kvm_s390_clear_pv_state()
81 free_pages(vcpu->arch.pv.stor_base, in kvm_s390_pv_destroy_cpu()
84 free_page((unsigned long)sida_addr(vcpu->arch.sie_block)); in kvm_s390_pv_destroy_cpu()
85 vcpu->arch.sie_block->pv_handle_cpu = 0; in kvm_s390_pv_destroy_cpu()
86 vcpu->arch.sie_block->pv_handle_config = 0; in kvm_s390_pv_destroy_cpu()
87 memset(&vcpu->arch.pv, 0, sizeof(vcpu->arch.pv)); in kvm_s390_pv_destroy_cpu()
88 vcpu->arch.sie_block->sdf = 0; in kvm_s390_pv_destroy_cpu()
94 vcpu->arch.sie_block->gbea = 1; in kvm_s390_pv_destroy_cpu()
112 vcpu->arch.pv.stor_base = __get_free_pages(GFP_KERNEL_ACCOUNT, in kvm_s390_pv_create_cpu()
114 if (!vcpu->arch.pv.stor_base) in kvm_s390_pv_create_cpu()
119 uvcb.num = vcpu->arch.sie_block->icpua; in kvm_s390_pv_create_cpu()
120 uvcb.state_origin = virt_to_phys(vcpu->arch.sie_block); in kvm_s390_pv_create_cpu()
121 uvcb.stor_origin = virt_to_phys((void *)vcpu->arch.pv.stor_base); in kvm_s390_pv_create_cpu()
126 free_pages(vcpu->arch.pv.stor_base, in kvm_s390_pv_create_cpu()
130 vcpu->arch.sie_block->sidad = virt_to_phys(sida_addr); in kvm_s390_pv_create_cpu()
148 vcpu->arch.pv.handle = uvcb.cpu_handle; in kvm_s390_pv_create_cpu()
149 vcpu->arch.sie_block->pv_handle_cpu = uvcb.cpu_handle; in kvm_s390_pv_create_cpu()
150 vcpu->arch.sie_block->pv_handle_config = kvm_s390_pv_get_handle(vcpu->kvm); in kvm_s390_pv_create_cpu()
151 vcpu->arch.sie_block->sdf = 2; in kvm_s390_pv_create_cpu()
159 vfree(kvm->arch.pv.stor_var); in kvm_s390_pv_dealloc_vm()
160 free_pages(kvm->arch.pv.stor_base, in kvm_s390_pv_dealloc_vm()
171 kvm->arch.pv.stor_var = NULL; in kvm_s390_pv_alloc_vm()
172 kvm->arch.pv.stor_base = __get_free_pages(GFP_KERNEL_ACCOUNT, get_order(base)); in kvm_s390_pv_alloc_vm()
173 if (!kvm->arch.pv.stor_base) in kvm_s390_pv_alloc_vm()
186 kvm->arch.pv.guest_len = npages * PAGE_SIZE; in kvm_s390_pv_alloc_vm()
191 kvm->arch.pv.stor_var = vzalloc(vlen); in kvm_s390_pv_alloc_vm()
192 if (!kvm->arch.pv.stor_var) in kvm_s390_pv_alloc_vm()
285 WRITE_ONCE(kvm->arch.gmap->guest_handle, 0); in kvm_s390_pv_deinit_vm_fast()
330 if (kvm->arch.pv.set_aside) in kvm_s390_pv_set_aside()
334 if ((kvm->arch.gmap->asce & _ASCE_TYPE_MASK) == _ASCE_TYPE_SEGMENT) in kvm_s390_pv_set_aside()
344 priv->stor_var = kvm->arch.pv.stor_var; in kvm_s390_pv_set_aside()
345 priv->stor_base = kvm->arch.pv.stor_base; in kvm_s390_pv_set_aside()
347 priv->old_gmap_table = (unsigned long)kvm->arch.gmap->table; in kvm_s390_pv_set_aside()
348 WRITE_ONCE(kvm->arch.gmap->guest_handle, 0); in kvm_s390_pv_set_aside()
349 if (s390_replace_asce(kvm->arch.gmap)) in kvm_s390_pv_set_aside()
360 kvm->arch.pv.set_aside = priv; in kvm_s390_pv_set_aside()
392 WRITE_ONCE(kvm->arch.gmap->guest_handle, 0); in kvm_s390_pv_deinit_vm()
398 s390_replace_asce(kvm->arch.gmap); in kvm_s390_pv_deinit_vm()
444 if (kvm->arch.pv.set_aside) { in kvm_s390_pv_deinit_cleanup_all()
445 list_add(kvm->arch.pv.set_aside, &kvm->arch.pv.need_cleanup); in kvm_s390_pv_deinit_cleanup_all()
446 kvm->arch.pv.set_aside = NULL; in kvm_s390_pv_deinit_cleanup_all()
450 while (!list_empty(&kvm->arch.pv.need_cleanup)) { in kvm_s390_pv_deinit_cleanup_all()
451 cur = list_first_entry(&kvm->arch.pv.need_cleanup, typeof(*cur), list); in kvm_s390_pv_deinit_cleanup_all()
506 p = kvm->arch.pv.set_aside; in kvm_s390_pv_deinit_aside_vm()
507 kvm->arch.pv.set_aside = NULL; in kvm_s390_pv_deinit_aside_vm()
526 list_add(&p->list, &kvm->arch.pv.need_cleanup); in kvm_s390_pv_deinit_aside_vm()
538 struct kvm *kvm = container_of(subscription, struct kvm, arch.pv.mmu_notifier); in kvm_s390_pv_mmu_notifier_release()
573 uvcb.guest_stor_len = kvm->arch.pv.guest_len; in kvm_s390_pv_init_vm()
574 uvcb.guest_asce = kvm->arch.gmap->asce; in kvm_s390_pv_init_vm()
575 uvcb.guest_sca = virt_to_phys(kvm->arch.sca); in kvm_s390_pv_init_vm()
577 virt_to_phys((void *)kvm->arch.pv.stor_base); in kvm_s390_pv_init_vm()
578 uvcb.conf_virt_stor_origin = (u64)kvm->arch.pv.stor_var; in kvm_s390_pv_init_vm()
579 uvcb.flags.ap_allow_instr = kvm->arch.model.uv_feat_guest.ap; in kvm_s390_pv_init_vm()
580 uvcb.flags.ap_instr_intr = kvm->arch.model.uv_feat_guest.ap_intr; in kvm_s390_pv_init_vm()
589 kvm->arch.pv.handle = uvcb.guest_handle; in kvm_s390_pv_init_vm()
601 kvm->arch.gmap->guest_handle = uvcb.guest_handle; in kvm_s390_pv_init_vm()
603 if (kvm->arch.pv.mmu_notifier.ops != &kvm_s390_pv_mmu_notifier_ops) { in kvm_s390_pv_init_vm()
604 kvm->arch.pv.mmu_notifier.ops = &kvm_s390_pv_mmu_notifier_ops; in kvm_s390_pv_init_vm()
605 mmu_notifier_register(&kvm->arch.pv.mmu_notifier, kvm->mm); in kvm_s390_pv_init_vm()
640 int ret = gmap_make_secure(kvm->arch.gmap, addr, &uvcb); in unpack_one()
704 .cpu_handle = vcpu->arch.pv.handle, in kvm_s390_pv_dump_cpu()
752 .config_handle = kvm->arch.pv.handle, in kvm_s390_pv_dump_stor_state()
883 kvm->arch.pv.dumping = false; in kvm_s390_pv_dump_complete()