diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2016-02-12 20:41:56 +0100 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2016-03-08 13:57:51 +0100 |
commit | 01a745ac8b6c5d323a37194c242f7c77f3402469 (patch) | |
tree | 104a6cf2afb5b8583ba90120ef4c5135d8c4db2c /arch/s390 | |
parent | dce382b6c72717b610741340f05e959764b851b8 (diff) | |
download | op-kernel-dev-01a745ac8b6c5d323a37194c242f7c77f3402469.zip op-kernel-dev-01a745ac8b6c5d323a37194c242f7c77f3402469.tar.gz |
KVM: s390: store cpu id in vcpu->cpu when scheduled in
By storing the cpu id, we have a way to verify if the current cpu is
owning a VCPU.
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 28bd5ea..bd5edb1 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -1449,10 +1449,12 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) restore_access_regs(vcpu->run->s.regs.acrs); gmap_enable(vcpu->arch.gmap); atomic_or(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); + vcpu->cpu = cpu; } void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) { + vcpu->cpu = -1; atomic_andnot(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); gmap_disable(vcpu->arch.gmap); |