Re: [PATCH v3 09/37] KVM: s390: protvirt: Add initial vm and cpu lifecycle handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



See my other mail, maybe we can merge alloc+create and handle most of
that conditional freeing in there.

> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 738f7fefcaec..cad04e26dccf 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -2173,6 +2173,11 @@ static void kvm_s390_cpus_from_pv(struct kvm *kvm, u16 *rc, u16 *rrc)
>         struct kvm_vcpu *vcpu;
>         int i;
>  
> +       /*
> +        * we ignore failures and try to destroy as many CPUs as possible.
> +        * At the same time we must not free the assigned ressources when
> +        * this fails, as the ultravisor has still access to that memory.
> +        */

Makes sense.

>         kvm_for_each_vcpu(i, vcpu, kvm) {
>                 mutex_lock(&vcpu->mutex);
>                 kvm_s390_pv_destroy_cpu(vcpu, rc, rrc);
> @@ -2221,6 +2226,7 @@ static int kvm_s390_handle_pv(struct kvm *kvm, struct kvm_pv_cmd *cmd)
>                         kvm_s390_pv_dealloc_vm(kvm);
>                         break;
>                 }
> +               /* we never switch back to bsca from esca */
>                 r = kvm_s390_pv_create_vm(kvm, &cmd->rc, &cmd->rrc);

Helpful.

-- 
Thanks,

David / dhildenb




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux