summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-09-14 18:07:35 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2015-09-14 18:07:35 +0300
commit51256484c033a6d57d71aa8f788c24e5dc82348a (patch)
treed6ce14cf9d5c1ae9fd6b5aac055d66fad0e1792f /arch/arm
parentedb9272f35d8bc97c86101a13f67d0ba16f3eecc (diff)
parent0c0672922dcc70ffba11d96385e98e42fb3ae08d (diff)
downloadlinux-51256484c033a6d57d71aa8f788c24e5dc82348a.tar.xz
Merge tag 'kvm-arm-for-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master
KVM/ARM changes for 4.3-rc2 - Fix timer interrupt injection after the rework that went in during the merge window - Reset the timer to zero on reboot - Make sure the TCR_EL2 RES1 bits are really set to 1 - Fix a PSCI affinity bug for non-existing vcpus
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/kvm/psci.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/arm/kvm/psci.c b/arch/arm/kvm/psci.c
index 4b94b513168d..ad6f6424f1d1 100644
--- a/arch/arm/kvm/psci.c
+++ b/arch/arm/kvm/psci.c
@@ -126,7 +126,7 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu)
static unsigned long kvm_psci_vcpu_affinity_info(struct kvm_vcpu *vcpu)
{
- int i;
+ int i, matching_cpus = 0;
unsigned long mpidr;
unsigned long target_affinity;
unsigned long target_affinity_mask;
@@ -151,12 +151,16 @@ static unsigned long kvm_psci_vcpu_affinity_info(struct kvm_vcpu *vcpu)
*/
kvm_for_each_vcpu(i, tmp, kvm) {
mpidr = kvm_vcpu_get_mpidr_aff(tmp);
- if (((mpidr & target_affinity_mask) == target_affinity) &&
- !tmp->arch.pause) {
- return PSCI_0_2_AFFINITY_LEVEL_ON;
+ if ((mpidr & target_affinity_mask) == target_affinity) {
+ matching_cpus++;
+ if (!tmp->arch.pause)
+ return PSCI_0_2_AFFINITY_LEVEL_ON;
}
}
+ if (!matching_cpus)
+ return PSCI_RET_INVALID_PARAMS;
+
return PSCI_0_2_AFFINITY_LEVEL_OFF;
}