Lines Matching refs:kvm_run

3866 static void sync_regs(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)  in sync_regs()  argument
3871 riccb = (struct runtime_instr_cb *) &kvm_run->s.regs.riccb; in sync_regs()
3872 gscb = (struct gs_cb *) &kvm_run->s.regs.gscb; in sync_regs()
3873 vcpu->arch.sie_block->gpsw.mask = kvm_run->psw_mask; in sync_regs()
3874 vcpu->arch.sie_block->gpsw.addr = kvm_run->psw_addr; in sync_regs()
3875 if (kvm_run->kvm_dirty_regs & KVM_SYNC_PREFIX) in sync_regs()
3876 kvm_s390_set_prefix(vcpu, kvm_run->s.regs.prefix); in sync_regs()
3877 if (kvm_run->kvm_dirty_regs & KVM_SYNC_CRS) { in sync_regs()
3878 memcpy(&vcpu->arch.sie_block->gcr, &kvm_run->s.regs.crs, 128); in sync_regs()
3882 if (kvm_run->kvm_dirty_regs & KVM_SYNC_ARCH0) { in sync_regs()
3883 kvm_s390_set_cpu_timer(vcpu, kvm_run->s.regs.cputm); in sync_regs()
3884 vcpu->arch.sie_block->ckc = kvm_run->s.regs.ckc; in sync_regs()
3885 vcpu->arch.sie_block->todpr = kvm_run->s.regs.todpr; in sync_regs()
3886 vcpu->arch.sie_block->pp = kvm_run->s.regs.pp; in sync_regs()
3887 vcpu->arch.sie_block->gbea = kvm_run->s.regs.gbea; in sync_regs()
3889 if (kvm_run->kvm_dirty_regs & KVM_SYNC_PFAULT) { in sync_regs()
3890 vcpu->arch.pfault_token = kvm_run->s.regs.pft; in sync_regs()
3891 vcpu->arch.pfault_select = kvm_run->s.regs.pfs; in sync_regs()
3892 vcpu->arch.pfault_compare = kvm_run->s.regs.pfc; in sync_regs()
3900 if ((kvm_run->kvm_dirty_regs & KVM_SYNC_RICCB) && in sync_regs()
3911 if ((kvm_run->kvm_dirty_regs & KVM_SYNC_GSCB) && in sync_regs()
3920 if ((kvm_run->kvm_dirty_regs & KVM_SYNC_BPBC) && in sync_regs()
3923 vcpu->arch.sie_block->fpf |= kvm_run->s.regs.bpbc ? FPF_BPBC : 0; in sync_regs()
3955 kvm_run->kvm_dirty_regs = 0; in sync_regs()
3958 static void store_regs(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) in store_regs() argument
3960 kvm_run->psw_mask = vcpu->arch.sie_block->gpsw.mask; in store_regs()
3961 kvm_run->psw_addr = vcpu->arch.sie_block->gpsw.addr; in store_regs()
3962 kvm_run->s.regs.prefix = kvm_s390_get_prefix(vcpu); in store_regs()
3963 memcpy(&kvm_run->s.regs.crs, &vcpu->arch.sie_block->gcr, 128); in store_regs()
3964 kvm_run->s.regs.cputm = kvm_s390_get_cpu_timer(vcpu); in store_regs()
3965 kvm_run->s.regs.ckc = vcpu->arch.sie_block->ckc; in store_regs()
3966 kvm_run->s.regs.todpr = vcpu->arch.sie_block->todpr; in store_regs()
3967 kvm_run->s.regs.pp = vcpu->arch.sie_block->pp; in store_regs()
3968 kvm_run->s.regs.gbea = vcpu->arch.sie_block->gbea; in store_regs()
3969 kvm_run->s.regs.pft = vcpu->arch.pfault_token; in store_regs()
3970 kvm_run->s.regs.pfs = vcpu->arch.pfault_select; in store_regs()
3971 kvm_run->s.regs.pfc = vcpu->arch.pfault_compare; in store_regs()
3972 kvm_run->s.regs.bpbc = (vcpu->arch.sie_block->fpf & FPF_BPBC) == FPF_BPBC; in store_regs()
3996 int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) in kvm_arch_vcpu_ioctl_run() argument
4000 if (kvm_run->immediate_exit) in kvm_arch_vcpu_ioctl_run()
4003 if (kvm_run->kvm_valid_regs & ~KVM_SYNC_S390_VALID_FIELDS || in kvm_arch_vcpu_ioctl_run()
4004 kvm_run->kvm_dirty_regs & ~KVM_SYNC_S390_VALID_FIELDS) in kvm_arch_vcpu_ioctl_run()
4026 sync_regs(vcpu, kvm_run); in kvm_arch_vcpu_ioctl_run()
4033 kvm_run->exit_reason = KVM_EXIT_INTR; in kvm_arch_vcpu_ioctl_run()
4048 store_regs(vcpu, kvm_run); in kvm_arch_vcpu_ioctl_run()