Skip to content

Commit b53221e

Browse files
mikeympe
authored andcommitted
KVM: PPC: Book3S HV: Handle migration with POWER9 disabled DAWR
POWER9 with the DAWR disabled causes problems for partition migration. Either we have to fail the migration (since we lose the DAWR) or we silently drop the DAWR and allow the migration to pass. This patch does the latter and allows the migration to pass (at the cost of silently losing the DAWR). This is not ideal but hopefully the best overall solution. This approach has been acked by Paulus. With this patch kvmppc_set_one_reg() will store the DAWR in the vcpu but won't actually set it on POWER9 hardware. Signed-off-by: Michael Neuling <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent e8ebedb commit b53221e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

arch/powerpc/kvm/book3s_hv_rmhandlers.S

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,8 +892,14 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_207S)
892892
ld r6, VCPU_DAWRX(r4)
893893
ld r7, VCPU_CIABR(r4)
894894
ld r8, VCPU_TAR(r4)
895+
/*
896+
* Handle broken DAWR case by not writing it. This means we
897+
* can still store the DAWR register for migration.
898+
*/
899+
BEGIN_FTR_SECTION
895900
mtspr SPRN_DAWR, r5
896901
mtspr SPRN_DAWRX, r6
902+
END_FTR_SECTION_IFSET(CPU_FTR_DAWR)
897903
mtspr SPRN_CIABR, r7
898904
mtspr SPRN_TAR, r8
899905
ld r5, VCPU_IC(r4)
@@ -1855,6 +1861,10 @@ BEGIN_FTR_SECTION
18551861
ld r6, STACK_SLOT_DAWR(r1)
18561862
ld r7, STACK_SLOT_DAWRX(r1)
18571863
mtspr SPRN_CIABR, r5
1864+
/*
1865+
* If the DAWR doesn't work, it's ok to write these here as
1866+
* this value should always be zero
1867+
*/
18581868
mtspr SPRN_DAWR, r6
18591869
mtspr SPRN_DAWRX, r7
18601870
END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)

0 commit comments

Comments
 (0)