]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: ppc: fix set regs to take care of msr change
authorHollis Blanchard <hollisb@us.ibm.com>
Wed, 5 Nov 2008 15:36:20 +0000 (09:36 -0600)
committerAvi Kivity <avi@redhat.com>
Wed, 31 Dec 2008 14:52:23 +0000 (16:52 +0200)
When changing some msr bits e.g. problem state we need to take special
care of that. We call the function in our mtmsr emulation (not needed for
wrtee[i]), but we don't call kvmppc_set_msr if we change msr via set_regs
ioctl.
It's a corner case we never hit so far, but I assume it should be
kvmppc_set_msr in our arch set regs function (I found it because it is also
a corner case when using pv support which would miss the update otherwise).

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/powerpc/kvm/booke.c

index b23cd54603f43900739bef1942ff810546a257d6..dec3f50a494f7373fb175068ab933862f8467409 100644 (file)
@@ -528,7 +528,7 @@ int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
        vcpu->arch.ctr = regs->ctr;
        vcpu->arch.lr = regs->lr;
        vcpu->arch.xer = regs->xer;
-       vcpu->arch.msr = regs->msr;
+       kvmppc_set_msr(vcpu, regs->msr);
        vcpu->arch.srr0 = regs->srr0;
        vcpu->arch.srr1 = regs->srr1;
        vcpu->arch.sprg0 = regs->sprg0;