Re: [PATCH v2 7/9] KVM: s390: Fix kvm_s390_clear_pv_state()
"Christoph Schlameuss" <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel,org.kernel.vger.kvm,org.kernel.vger.linux-s390 |
|---|---|
| Message-ID | <[email protected]> |
On Wed Aug 12, 2026 at 12:44 PM CEST, Claudio Imbrenda wrote:
> kvm_s390_clear_pv_state() needs to also clear the dumping flag, to
> allow the protected VM to be started again (as non-protected, with all
> protected state safely destroyed) after a forced reboot while a
> protected dump was ongoing and not completed.
>
> Fixes: e40df9efd68a ("KVM: s390: pv: clear the state without memset")
> Signed-off-by: Claudio Imbrenda <[email protected]>
> Reviewed-by: Christian Borntraeger <[email protected]>
Acked-by: Christoph Schlameuss <[email protected]>
> ---
> arch/s390/kvm/pv.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/s390/kvm/pv.c b/arch/s390/kvm/pv.c
> index b02e0159d3cd..98a9a57f71b9 100644
> --- a/arch/s390/kvm/pv.c
> +++ b/arch/s390/kvm/pv.c
> @@ -242,6 +242,10 @@ static void kvm_s390_clear_pv_state(struct kvm *kvm)
> kvm->arch.pv.guest_len = 0;
> kvm->arch.pv.stor_base = 0;
> kvm->arch.pv.stor_var = NULL;
> + if (kvm->arch.pv.dumping) {
> + kvm_s390_vcpu_unblock_all(kvm);
> + kvm->arch.pv.dumping = false;
> + }
> }
>
> static void kvm_s390_pv_dispose_cpu(struct kvm_vcpu *vcpu, bool free_stor_base)