All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: PPC: Apply paravirt to all vcpu
@ 2011-11-22  9:55 Liu Yu
  2011-11-22 11:13 ` Alexander Graf
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Liu Yu @ 2011-11-22  9:55 UTC (permalink / raw)
  To: kvm-ppc

Previously, only primary vcpu get enabled paravirt.

Signed-off-by: Liu Yu <yu.liu@freescale.com>
---
 arch/powerpc/kvm/powerpc.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 73508e7..a727064 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -78,8 +78,13 @@ int kvmppc_kvm_pv(struct kvm_vcpu *vcpu)
 	switch (nr) {
 	case HC_VENDOR_KVM | KVM_HC_PPC_MAP_MAGIC_PAGE:
 	{
-		vcpu->arch.magic_page_pa = param1;
-		vcpu->arch.magic_page_ea = param2;
+		struct kvm *kvm = vcpu->kvm;
+		struct kvm_vcpu *v;
+
+		kvm_for_each_vcpu(r, v, kvm) {
+			v->arch.magic_page_pa = param1;
+			v->arch.magic_page_ea = param2;
+		}
 
 		r2 = KVM_MAGIC_FEAT_SR | KVM_MAGIC_FEAT_MAS0_TO_SPRG7;
 
-- 
1.6.4



^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-11-25 10:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-22  9:55 [PATCH] KVM: PPC: Apply paravirt to all vcpu Liu Yu
2011-11-22 11:13 ` Alexander Graf
2011-11-22 11:19 ` Liu Yu-B13201
2011-11-22 11:27 ` Alexander Graf
2011-11-22 18:36 ` Scott Wood
2011-11-22 20:44 ` Alexander Graf
2011-11-22 21:11 ` Yoder Stuart-B08248
2011-11-22 21:27 ` Alexander Graf
2011-11-22 21:45 ` Yoder Stuart-B08248
2011-11-22 22:02 ` Scott Wood
2011-11-25  6:52 ` Liu Yu-B13201
2011-11-25 10:00 ` Alexander Graf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.