lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <D1QZUCKP1YIR.3FYPGS64LOMAT@gmail.com>
Date: Tue, 04 Jun 2024 15:46:24 +1000
From: "Nicholas Piggin" <npiggin@...il.com>
To: "Shivaprasad G Bhat" <sbhat@...ux.ibm.com>, <kvm@...r.kernel.org>,
 <linux-doc@...r.kernel.org>, <linuxppc-dev@...ts.ozlabs.org>
Cc: <pbonzini@...hat.com>, <naveen.n.rao@...ux.ibm.com>,
 <christophe.leroy@...roup.eu>, <corbet@....net>, <mpe@...erman.id.au>,
 <namhyung@...nel.org>, <pbonzini@...hat.com>, <jniethe5@...il.com>,
 <atrajeev@...ux.vnet.ibm.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 5/6] KVM: PPC: Book3S HV nestedv2: Keep nested guest
 HASHKEYR in sync

On Mon Jun 3, 2024 at 9:14 PM AEST, Shivaprasad G Bhat wrote:
> 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 <sbhat@...ux.ibm.com>
> ---
>  arch/powerpc/include/asm/kvm_host.h   |    1 +
>  arch/powerpc/kvm/book3s_hv.h          |    1 +
>  arch/powerpc/kvm/book3s_hv_nestedv2.c |    6 ++++++
>  3 files changed, 8 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
> index 1e2fdcbecffd..a0cd9dbf534f 100644
> --- a/arch/powerpc/include/asm/kvm_host.h
> +++ b/arch/powerpc/include/asm/kvm_host.h
> @@ -600,6 +600,7 @@ struct kvm_vcpu_arch {
>  	ulong dawr1;
>  	ulong dawrx1;
>  	ulong dexcr;
> +	ulong hashkeyr;
>  	ulong ciabr;
>  	ulong cfar;
>  	ulong ppr;

Same comment applies

Reviewed-by: Nicholas Piggin <npiggin@...il.com>

Thanks,
Nick

> diff --git a/arch/powerpc/kvm/book3s_hv.h b/arch/powerpc/kvm/book3s_hv.h
> index 7b0fd282fe95..c073fdfa7dc4 100644
> --- a/arch/powerpc/kvm/book3s_hv.h
> +++ b/arch/powerpc/kvm/book3s_hv.h
> @@ -117,6 +117,7 @@ KVMPPC_BOOK3S_HV_VCPU_ACCESSOR(dawr1, 64, KVMPPC_GSID_DAWR1)
>  KVMPPC_BOOK3S_HV_VCPU_ACCESSOR(dawrx0, 64, KVMPPC_GSID_DAWRX0)
>  KVMPPC_BOOK3S_HV_VCPU_ACCESSOR(dawrx1, 64, KVMPPC_GSID_DAWRX1)
>  KVMPPC_BOOK3S_HV_VCPU_ACCESSOR(dexcr, 64, KVMPPC_GSID_DEXCR)
> +KVMPPC_BOOK3S_HV_VCPU_ACCESSOR(hashkeyr, 64, KVMPPC_GSID_HASHKEYR)
>  KVMPPC_BOOK3S_HV_VCPU_ACCESSOR(ciabr, 64, KVMPPC_GSID_CIABR)
>  KVMPPC_BOOK3S_HV_VCPU_ACCESSOR(wort, 64, KVMPPC_GSID_WORT)
>  KVMPPC_BOOK3S_HV_VCPU_ACCESSOR(ppr, 64, KVMPPC_GSID_PPR)
> diff --git a/arch/powerpc/kvm/book3s_hv_nestedv2.c b/arch/powerpc/kvm/book3s_hv_nestedv2.c
> index d207a6d936ff..bbff933f2ccc 100644
> --- a/arch/powerpc/kvm/book3s_hv_nestedv2.c
> +++ b/arch/powerpc/kvm/book3s_hv_nestedv2.c
> @@ -196,6 +196,9 @@ static int gs_msg_ops_vcpu_fill_info(struct kvmppc_gs_buff *gsb,
>  		case KVMPPC_GSID_DEXCR:
>  			rc = kvmppc_gse_put_u64(gsb, iden, vcpu->arch.dexcr);
>  			break;
> +		case KVMPPC_GSID_HASHKEYR:
> +			rc = kvmppc_gse_put_u64(gsb, iden, vcpu->arch.hashkeyr);
> +			break;
>  		case KVMPPC_GSID_CIABR:
>  			rc = kvmppc_gse_put_u64(gsb, iden, vcpu->arch.ciabr);
>  			break;
> @@ -447,6 +450,9 @@ static int gs_msg_ops_vcpu_refresh_info(struct kvmppc_gs_msg *gsm,
>  		case KVMPPC_GSID_DEXCR:
>  			vcpu->arch.dexcr = kvmppc_gse_get_u64(gse);
>  			break;
> +		case KVMPPC_GSID_HASHKEYR:
> +			vcpu->arch.hashkeyr = kvmppc_gse_get_u64(gse);
> +			break;
>  		case KVMPPC_GSID_CIABR:
>  			vcpu->arch.ciabr = kvmppc_gse_get_u64(gse);
>  			break;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ