Skip to content

Commit

Permalink
KVM: PPC: Book3S HV nestedv2: Keep nested guest HASHPKEYR in sync
Browse files Browse the repository at this point in the history
The nestedv2 APIs has the guest state element defined for HASHPKEYR
for the save-restore with L0. However, its ignored in the code.

The patch takes care of this for the HASHPKEYR GSID.

Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/171759286679.1480.17383725118762651985.stgit@linux.ibm.com
  • Loading branch information
Shivaprasad G Bhat authored and Michael Ellerman committed Jun 6, 2024
1 parent 9a0d2f4 commit 0b65365
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/powerpc/kvm/book3s_hv_nestedv2.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ static int gs_msg_ops_vcpu_fill_info(struct kvmppc_gs_buff *gsb,
case KVMPPC_GSID_HASHKEYR:
rc = kvmppc_gse_put_u64(gsb, iden, vcpu->arch.hashkeyr);
break;
case KVMPPC_GSID_HASHPKEYR:
rc = kvmppc_gse_put_u64(gsb, iden, vcpu->arch.hashpkeyr);
break;
case KVMPPC_GSID_CIABR:
rc = kvmppc_gse_put_u64(gsb, iden, vcpu->arch.ciabr);
break;
Expand Down Expand Up @@ -457,6 +460,9 @@ static int gs_msg_ops_vcpu_refresh_info(struct kvmppc_gs_msg *gsm,
case KVMPPC_GSID_HASHKEYR:
vcpu->arch.hashkeyr = kvmppc_gse_get_u64(gse);
break;
case KVMPPC_GSID_HASHPKEYR:
vcpu->arch.hashpkeyr = kvmppc_gse_get_u64(gse);
break;
case KVMPPC_GSID_CIABR:
vcpu->arch.ciabr = kvmppc_gse_get_u64(gse);
break;
Expand Down

0 comments on commit 0b65365

Please sign in to comment.