mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 20:54:10 +00:00
KVM: s390: Simplify online vcpus counting for stsi
We don't need to loop over all cpus to get the number of vcpus. Let's use the available counter online_vcpus instead. Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
parent
afa45ff521
commit
ff520a6327
1 changed files with 1 additions and 6 deletions
|
@ -396,15 +396,10 @@ static int handle_stidp(struct kvm_vcpu *vcpu)
|
|||
|
||||
static void handle_stsi_3_2_2(struct kvm_vcpu *vcpu, struct sysinfo_3_2_2 *mem)
|
||||
{
|
||||
struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int;
|
||||
int cpus = 0;
|
||||
int n;
|
||||
|
||||
spin_lock(&fi->lock);
|
||||
for (n = 0; n < KVM_MAX_VCPUS; n++)
|
||||
if (fi->local_int[n])
|
||||
cpus++;
|
||||
spin_unlock(&fi->lock);
|
||||
cpus = atomic_read(&vcpu->kvm->online_vcpus);
|
||||
|
||||
/* deal with other level 3 hypervisors */
|
||||
if (stsi(mem, 3, 2, 2))
|
||||
|
|
Loading…
Add table
Reference in a new issue