Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297063
b: refs/heads/master
c: 60b413c
h: refs/heads/master
i:
  297061: 60d3d87
  297059: 4740adb
  297055: dc9cc32
v: v3
  • Loading branch information
Christian Borntraeger authored and Avi Kivity committed Mar 5, 2012
1 parent e2e6bc8 commit d02e495
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b9e5dc8d4511e6a00862a795319569e7fe7f60f4
refs/heads/master: 60b413c9248495ea400e80e08e4d1e28ed7ee05e
2 changes: 2 additions & 0 deletions trunk/arch/s390/include/asm/kvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ struct kvm_debug_exit_arch {
struct kvm_guest_debug_arch {
};

#define KVM_SYNC_PREFIX (1UL << 0)
/* definition of registers in kvm_run */
struct kvm_sync_regs {
__u64 prefix; /* prefix register */
};
#endif
7 changes: 7 additions & 0 deletions trunk/arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ int kvm_dev_ioctl_check_extension(long ext)
#ifdef CONFIG_KVM_S390_UCONTROL
case KVM_CAP_S390_UCONTROL:
#endif
case KVM_CAP_SYNC_REGS:
r = 1;
break;
default:
Expand Down Expand Up @@ -288,6 +289,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
}

vcpu->arch.gmap = vcpu->kvm->arch.gmap;
vcpu->run->kvm_valid_regs = KVM_SYNC_PREFIX;
return 0;
}

Expand Down Expand Up @@ -572,6 +574,10 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)

vcpu->arch.sie_block->gpsw.mask = kvm_run->psw_mask;
vcpu->arch.sie_block->gpsw.addr = kvm_run->psw_addr;
if (kvm_run->kvm_dirty_regs & KVM_SYNC_PREFIX) {
kvm_run->kvm_dirty_regs &= ~KVM_SYNC_PREFIX;
kvm_s390_set_prefix(vcpu, kvm_run->s.regs.prefix);
}

might_fault();

Expand Down Expand Up @@ -620,6 +626,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)

kvm_run->psw_mask = vcpu->arch.sie_block->gpsw.mask;
kvm_run->psw_addr = vcpu->arch.sie_block->gpsw.addr;
kvm_run->s.regs.prefix = vcpu->arch.sie_block->prefix;

if (vcpu->sigset_active)
sigprocmask(SIG_SETMASK, &sigsaved, NULL);
Expand Down

0 comments on commit d02e495

Please sign in to comment.