Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297106
b: refs/heads/master
c: b543403
h: refs/heads/master
v: v3
  • Loading branch information
Matt Evans authored and Avi Kivity committed Mar 5, 2012
1 parent 7c56151 commit 626016c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03cdab5340b423ec88fc18eb158a62a8a7b94d7f
refs/heads/master: b5434032fcfd7490c6453feb397fb781762b6f09
16 changes: 16 additions & 0 deletions trunk/arch/powerpc/kvm/powerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,22 @@ int kvm_dev_ioctl_check_extension(long ext)
r = cpu_has_feature(CPU_FTR_ARCH_206) ? 1 : 0;
break;
#endif
case KVM_CAP_NR_VCPUS:
/*
* Recommending a number of CPUs is somewhat arbitrary; we
* return the number of present CPUs for -HV (since a host
* will have secondary threads "offline"), and for other KVM
* implementations just count online CPUs.
*/
#ifdef CONFIG_KVM_BOOK3S_64_HV
r = num_present_cpus();
#else
r = num_online_cpus();
#endif
break;
case KVM_CAP_MAX_VCPUS:
r = KVM_MAX_VCPUS;
break;
default:
r = 0;
break;
Expand Down

0 comments on commit 626016c

Please sign in to comment.