Skip to content

Commit 1e97c1e

Browse files
ShivaprasadGBhatmpe
authored andcommitted
KVM: PPC: Book3S HV nestedv2: Keep nested guest HASHKEYR in sync
The nestedv2 APIs has the guest state element defined for HASHKEYR for the save-restore with L0. However, its ignored in the code. The patch takes care of this for the HASHKEYR GSID. Signed-off-by: Shivaprasad G Bhat <[email protected]> Reviewed-by: Nicholas Piggin <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
1 parent e9eb790 commit 1e97c1e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arch/powerpc/kvm/book3s_hv_nestedv2.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ static int gs_msg_ops_vcpu_fill_info(struct kvmppc_gs_buff *gsb,
196196
case KVMPPC_GSID_DEXCR:
197197
rc = kvmppc_gse_put_u64(gsb, iden, vcpu->arch.dexcr);
198198
break;
199+
case KVMPPC_GSID_HASHKEYR:
200+
rc = kvmppc_gse_put_u64(gsb, iden, vcpu->arch.hashkeyr);
201+
break;
199202
case KVMPPC_GSID_CIABR:
200203
rc = kvmppc_gse_put_u64(gsb, iden, vcpu->arch.ciabr);
201204
break;
@@ -451,6 +454,9 @@ static int gs_msg_ops_vcpu_refresh_info(struct kvmppc_gs_msg *gsm,
451454
case KVMPPC_GSID_DEXCR:
452455
vcpu->arch.dexcr = kvmppc_gse_get_u64(gse);
453456
break;
457+
case KVMPPC_GSID_HASHKEYR:
458+
vcpu->arch.hashkeyr = kvmppc_gse_get_u64(gse);
459+
break;
454460
case KVMPPC_GSID_CIABR:
455461
vcpu->arch.ciabr = kvmppc_gse_get_u64(gse);
456462
break;

0 commit comments

Comments
 (0)