From: David Hildenbrand Date: Wed, 14 Jan 2015 13:08:38 +0000 (+0100) Subject: KVM: s390: factor out and optimize floating irq VCPU kick X-Git-Tag: omap-for-v4.2/fixes-rc1^2~138^2~84^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96e0ed23dca3769053c5211ef885e789097834bf;p=pandora-kernel.git KVM: s390: factor out and optimize floating irq VCPU kick This patch factors out the search for a floating irq destination VCPU as well as the kicking of the found VCPU. The search is optimized in the following ways: 1. stopped VCPUs can't take any floating interrupts, so try to find an operating one. We have to take care of the special case where all VCPUs are stopped and we don't have any valid destination. 2. use online_vcpus, not KVM_MAX_VCPU. This speeds up the search especially if KVM_MAX_VCPU is increased one day. As these VCPU objects are initialized prior to increasing online_vcpus, we can be sure that they exist. Reviewed-by: Cornelia Huck Reviewed-by: Dominik Dingel Reviewed-by: Jens Freimann Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger --- Reading git-diff-tree failed