Skip to content

Commit 4dbf6fe

Browse files
Sean Christophersonbonzini
authored andcommitted
KVM: PPC: e500mc: Move reset of oldpir below call to kvm_vcpu_init()
Move the initialization of oldpir so that the call to kvm_vcpu_init() is at the top of kvmppc_core_vcpu_create_e500mc(). oldpir is only use when loading/putting a vCPU, which currently cannot be done until after kvm_arch_vcpu_create() completes. Reording the call to kvm_vcpu_init() paves the way for moving the invocation to common PPC code. No functional change intended. Signed-off-by: Sean Christopherson <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent d307695 commit 4dbf6fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/powerpc/kvm/e500mc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,13 @@ static int kvmppc_core_vcpu_create_e500mc(struct kvm *kvm, struct kvm_vcpu *vcpu
310310
BUILD_BUG_ON(offsetof(struct kvmppc_vcpu_e500, vcpu) != 0);
311311
vcpu_e500 = to_e500(vcpu);
312312

313-
/* Invalid PIR value -- this LPID dosn't have valid state on any cpu */
314-
vcpu->arch.oldpir = 0xffffffff;
315-
316313
err = kvm_vcpu_init(vcpu, kvm, id);
317314
if (err)
318315
return err;
319316

317+
/* Invalid PIR value -- this LPID dosn't have valid state on any cpu */
318+
vcpu->arch.oldpir = 0xffffffff;
319+
320320
err = kvmppc_e500_tlb_init(vcpu_e500);
321321
if (err)
322322
goto uninit_vcpu;

0 commit comments

Comments
 (0)