kvm-s390.c (0759d0681cae279e77ebb4b76175e330360b01d9) kvm-s390.c (4ae3c0815fb63cbed1afcd5bacc7705c6d1b9fec)
1/*
2 * hosting zSeries kernel virtual machines
3 *
4 * Copyright IBM Corp. 2008, 2009
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.

--- 1508 unchanged lines hidden (view full) ---

1517 return;
1518
1519 trace_kvm_s390_vcpu_start_stop(vcpu->vcpu_id, 0);
1520 /* Only one cpu at a time may enter/leave the STOPPED state. */
1521 spin_lock_bh(&vcpu->kvm->arch.start_stop_lock);
1522 online_vcpus = atomic_read(&vcpu->kvm->online_vcpus);
1523
1524 /* Need to lock access to action_bits to avoid a SIGP race condition */
1/*
2 * hosting zSeries kernel virtual machines
3 *
4 * Copyright IBM Corp. 2008, 2009
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.

--- 1508 unchanged lines hidden (view full) ---

1517 return;
1518
1519 trace_kvm_s390_vcpu_start_stop(vcpu->vcpu_id, 0);
1520 /* Only one cpu at a time may enter/leave the STOPPED state. */
1521 spin_lock_bh(&vcpu->kvm->arch.start_stop_lock);
1522 online_vcpus = atomic_read(&vcpu->kvm->online_vcpus);
1523
1524 /* Need to lock access to action_bits to avoid a SIGP race condition */
1525 spin_lock_bh(&vcpu->arch.local_int.lock);
1525 spin_lock(&vcpu->arch.local_int.lock);
1526 atomic_set_mask(CPUSTAT_STOPPED, &vcpu->arch.sie_block->cpuflags);
1527
1528 /* SIGP STOP and SIGP STOP AND STORE STATUS has been fully processed */
1529 vcpu->arch.local_int.action_bits &=
1530 ~(ACTION_STOP_ON_STOP | ACTION_STORE_ON_STOP);
1526 atomic_set_mask(CPUSTAT_STOPPED, &vcpu->arch.sie_block->cpuflags);
1527
1528 /* SIGP STOP and SIGP STOP AND STORE STATUS has been fully processed */
1529 vcpu->arch.local_int.action_bits &=
1530 ~(ACTION_STOP_ON_STOP | ACTION_STORE_ON_STOP);
1531 spin_unlock_bh(&vcpu->arch.local_int.lock);
1531 spin_unlock(&vcpu->arch.local_int.lock);
1532
1533 __disable_ibs_on_vcpu(vcpu);
1534
1535 for (i = 0; i < online_vcpus; i++) {
1536 if (!is_vcpu_stopped(vcpu->kvm->vcpus[i])) {
1537 started_vcpus++;
1538 started_vcpu = vcpu->kvm->vcpus[i];
1539 }

--- 263 unchanged lines hidden ---
1532
1533 __disable_ibs_on_vcpu(vcpu);
1534
1535 for (i = 0; i < online_vcpus; i++) {
1536 if (!is_vcpu_stopped(vcpu->kvm->vcpus[i])) {
1537 started_vcpus++;
1538 started_vcpu = vcpu->kvm->vcpus[i];
1539 }

--- 263 unchanged lines hidden ---