* [PATCH kernel v2] KVM: PPC: Use arch_get_random_seed_long instead of powernv variant
@ 2021-08-05 7:56 ` Alexey Kardashevskiy
0 siblings, 0 replies; 9+ messages in thread
From: Alexey Kardashevskiy @ 2021-08-05 7:56 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Alexey Kardashevskiy, kvm-ppc, Michael Ellerman, kvm
The powernv_get_random_long() does not work in nested KVM (which is
pseries) and produces a crash when accessing in_be64(rng->regs) in
powernv_get_random_long().
This replaces powernv_get_random_long with the ppc_md machine hook
wrapper.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
Changes:
v2:
* replaces [PATCH kernel] powerpc/powernv: Check if powernv_rng is initialized
---
arch/powerpc/kvm/book3s_hv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index be0cde26f156..ecfd133e0ca8 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -1165,7 +1165,7 @@ int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu)
break;
#endif
case H_RANDOM:
- if (!powernv_get_random_long(&vcpu->arch.regs.gpr[4]))
+ if (!arch_get_random_seed_long(&vcpu->arch.regs.gpr[4]))
ret = H_HARDWARE;
break;
case H_RPT_INVALIDATE:
--
2.30.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH kernel v2] KVM: PPC: Use arch_get_random_seed_long instead of powernv variant
@ 2021-08-05 7:56 ` Alexey Kardashevskiy
0 siblings, 0 replies; 9+ messages in thread
From: Alexey Kardashevskiy @ 2021-08-05 7:56 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Alexey Kardashevskiy, kvm, kvm-ppc
The powernv_get_random_long() does not work in nested KVM (which is
pseries) and produces a crash when accessing in_be64(rng->regs) in
powernv_get_random_long().
This replaces powernv_get_random_long with the ppc_md machine hook
wrapper.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
Changes:
v2:
* replaces [PATCH kernel] powerpc/powernv: Check if powernv_rng is initialized
---
arch/powerpc/kvm/book3s_hv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index be0cde26f156..ecfd133e0ca8 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -1165,7 +1165,7 @@ int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu)
break;
#endif
case H_RANDOM:
- if (!powernv_get_random_long(&vcpu->arch.regs.gpr[4]))
+ if (!arch_get_random_seed_long(&vcpu->arch.regs.gpr[4]))
ret = H_HARDWARE;
break;
case H_RPT_INVALIDATE:
--
2.30.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH kernel v2] KVM: PPC: Use arch_get_random_seed_long instead of powernv variant
@ 2021-08-05 7:56 ` Alexey Kardashevskiy
0 siblings, 0 replies; 9+ messages in thread
From: Alexey Kardashevskiy @ 2021-08-05 7:56 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Alexey Kardashevskiy, kvm-ppc, Michael Ellerman, kvm
The powernv_get_random_long() does not work in nested KVM (which is
pseries) and produces a crash when accessing in_be64(rng->regs) in
powernv_get_random_long().
This replaces powernv_get_random_long with the ppc_md machine hook
wrapper.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
Changes:
v2:
* replaces [PATCH kernel] powerpc/powernv: Check if powernv_rng is initialized
---
arch/powerpc/kvm/book3s_hv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index be0cde26f156..ecfd133e0ca8 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -1165,7 +1165,7 @@ int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu)
break;
#endif
case H_RANDOM:
- if (!powernv_get_random_long(&vcpu->arch.regs.gpr[4]))
+ if (!arch_get_random_seed_long(&vcpu->arch.regs.gpr[4]))
ret = H_HARDWARE;
break;
case H_RPT_INVALIDATE:
--
2.30.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH kernel v2] KVM: PPC: Use arch_get_random_seed_long instead of powernv variant
2021-08-05 7:56 ` Alexey Kardashevskiy
(?)
@ 2021-08-06 14:53 ` Fabiano Rosas
-1 siblings, 0 replies; 9+ messages in thread
From: Fabiano Rosas @ 2021-08-06 14:53 UTC (permalink / raw)
To: Alexey Kardashevskiy, linuxppc-dev
Cc: Alexey Kardashevskiy, kvm-ppc, Michael Ellerman, kvm
Alexey Kardashevskiy <aik@ozlabs.ru> writes:
> The powernv_get_random_long() does not work in nested KVM (which is
> pseries) and produces a crash when accessing in_be64(rng->regs) in
> powernv_get_random_long().
>
> This replaces powernv_get_random_long with the ppc_md machine hook
> wrapper.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
> ---
>
> Changes:
> v2:
> * replaces [PATCH kernel] powerpc/powernv: Check if powernv_rng is initialized
>
> ---
> arch/powerpc/kvm/book3s_hv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
> index be0cde26f156..ecfd133e0ca8 100644
> --- a/arch/powerpc/kvm/book3s_hv.c
> +++ b/arch/powerpc/kvm/book3s_hv.c
> @@ -1165,7 +1165,7 @@ int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu)
> break;
> #endif
> case H_RANDOM:
> - if (!powernv_get_random_long(&vcpu->arch.regs.gpr[4]))
> + if (!arch_get_random_seed_long(&vcpu->arch.regs.gpr[4]))
> ret = H_HARDWARE;
> break;
> case H_RPT_INVALIDATE:
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH kernel v2] KVM: PPC: Use arch_get_random_seed_long instead of powernv variant
@ 2021-08-06 14:53 ` Fabiano Rosas
0 siblings, 0 replies; 9+ messages in thread
From: Fabiano Rosas @ 2021-08-06 14:53 UTC (permalink / raw)
To: Alexey Kardashevskiy, linuxppc-dev; +Cc: Alexey Kardashevskiy, kvm, kvm-ppc
Alexey Kardashevskiy <aik@ozlabs.ru> writes:
> The powernv_get_random_long() does not work in nested KVM (which is
> pseries) and produces a crash when accessing in_be64(rng->regs) in
> powernv_get_random_long().
>
> This replaces powernv_get_random_long with the ppc_md machine hook
> wrapper.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
> ---
>
> Changes:
> v2:
> * replaces [PATCH kernel] powerpc/powernv: Check if powernv_rng is initialized
>
> ---
> arch/powerpc/kvm/book3s_hv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
> index be0cde26f156..ecfd133e0ca8 100644
> --- a/arch/powerpc/kvm/book3s_hv.c
> +++ b/arch/powerpc/kvm/book3s_hv.c
> @@ -1165,7 +1165,7 @@ int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu)
> break;
> #endif
> case H_RANDOM:
> - if (!powernv_get_random_long(&vcpu->arch.regs.gpr[4]))
> + if (!arch_get_random_seed_long(&vcpu->arch.regs.gpr[4]))
> ret = H_HARDWARE;
> break;
> case H_RPT_INVALIDATE:
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH kernel v2] KVM: PPC: Use arch_get_random_seed_long instead of powernv variant
@ 2021-08-06 14:53 ` Fabiano Rosas
0 siblings, 0 replies; 9+ messages in thread
From: Fabiano Rosas @ 2021-08-06 14:53 UTC (permalink / raw)
To: Alexey Kardashevskiy, linuxppc-dev
Cc: Alexey Kardashevskiy, kvm-ppc, Michael Ellerman, kvm
Alexey Kardashevskiy <aik@ozlabs.ru> writes:
> The powernv_get_random_long() does not work in nested KVM (which is
> pseries) and produces a crash when accessing in_be64(rng->regs) in
> powernv_get_random_long().
>
> This replaces powernv_get_random_long with the ppc_md machine hook
> wrapper.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
> ---
>
> Changes:
> v2:
> * replaces [PATCH kernel] powerpc/powernv: Check if powernv_rng is initialized
>
> ---
> arch/powerpc/kvm/book3s_hv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
> index be0cde26f156..ecfd133e0ca8 100644
> --- a/arch/powerpc/kvm/book3s_hv.c
> +++ b/arch/powerpc/kvm/book3s_hv.c
> @@ -1165,7 +1165,7 @@ int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu)
> break;
> #endif
> case H_RANDOM:
> - if (!powernv_get_random_long(&vcpu->arch.regs.gpr[4]))
> + if (!arch_get_random_seed_long(&vcpu->arch.regs.gpr[4]))
> ret = H_HARDWARE;
> break;
> case H_RPT_INVALIDATE:
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH kernel v2] KVM: PPC: Use arch_get_random_seed_long instead of powernv variant
2021-08-05 7:56 ` Alexey Kardashevskiy
(?)
@ 2021-08-18 13:38 ` Michael Ellerman
-1 siblings, 0 replies; 9+ messages in thread
From: Michael Ellerman @ 2021-08-18 13:38 UTC (permalink / raw)
To: Alexey Kardashevskiy, linuxppc-dev; +Cc: kvm, kvm-ppc, Michael Ellerman
On Thu, 5 Aug 2021 17:56:49 +1000, Alexey Kardashevskiy wrote:
> The powernv_get_random_long() does not work in nested KVM (which is
> pseries) and produces a crash when accessing in_be64(rng->regs) in
> powernv_get_random_long().
>
> This replaces powernv_get_random_long with the ppc_md machine hook
> wrapper.
Applied to powerpc/next.
[1/1] KVM: PPC: Use arch_get_random_seed_long instead of powernv variant
https://git.kernel.org/powerpc/c/2ac78e0c00184a9ba53d507be7549c69a3f566b6
cheers
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH kernel v2] KVM: PPC: Use arch_get_random_seed_long instead of powernv variant
@ 2021-08-18 13:38 ` Michael Ellerman
0 siblings, 0 replies; 9+ messages in thread
From: Michael Ellerman @ 2021-08-18 13:38 UTC (permalink / raw)
To: Alexey Kardashevskiy, linuxppc-dev; +Cc: kvm-ppc, kvm
On Thu, 5 Aug 2021 17:56:49 +1000, Alexey Kardashevskiy wrote:
> The powernv_get_random_long() does not work in nested KVM (which is
> pseries) and produces a crash when accessing in_be64(rng->regs) in
> powernv_get_random_long().
>
> This replaces powernv_get_random_long with the ppc_md machine hook
> wrapper.
Applied to powerpc/next.
[1/1] KVM: PPC: Use arch_get_random_seed_long instead of powernv variant
https://git.kernel.org/powerpc/c/2ac78e0c00184a9ba53d507be7549c69a3f566b6
cheers
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH kernel v2] KVM: PPC: Use arch_get_random_seed_long instead of powernv variant
@ 2021-08-18 13:38 ` Michael Ellerman
0 siblings, 0 replies; 9+ messages in thread
From: Michael Ellerman @ 2021-08-18 13:38 UTC (permalink / raw)
To: Alexey Kardashevskiy, linuxppc-dev; +Cc: kvm, kvm-ppc, Michael Ellerman
On Thu, 5 Aug 2021 17:56:49 +1000, Alexey Kardashevskiy wrote:
> The powernv_get_random_long() does not work in nested KVM (which is
> pseries) and produces a crash when accessing in_be64(rng->regs) in
> powernv_get_random_long().
>
> This replaces powernv_get_random_long with the ppc_md machine hook
> wrapper.
Applied to powerpc/next.
[1/1] KVM: PPC: Use arch_get_random_seed_long instead of powernv variant
https://git.kernel.org/powerpc/c/2ac78e0c00184a9ba53d507be7549c69a3f566b6
cheers
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-08-18 13:49 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05 7:56 [PATCH kernel v2] KVM: PPC: Use arch_get_random_seed_long instead of powernv variant Alexey Kardashevskiy
2021-08-05 7:56 ` Alexey Kardashevskiy
2021-08-05 7:56 ` Alexey Kardashevskiy
2021-08-06 14:53 ` Fabiano Rosas
2021-08-06 14:53 ` Fabiano Rosas
2021-08-06 14:53 ` Fabiano Rosas
2021-08-18 13:38 ` Michael Ellerman
2021-08-18 13:38 ` Michael Ellerman
2021-08-18 13:38 ` Michael Ellerman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.