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]
Date:   Tue, 29 Aug 2017 15:00:44 +0200
From:   Cornelia Huck <cohuck@...hat.com>
To:     David Hildenbrand <david@...hat.com>
Cc:     Radim Krčmář <rkrcmar@...hat.com>,
        linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        linux-mips@...ux-mips.org, kvm-ppc@...r.kernel.org,
        linux-s390@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Paolo Bonzini <pbonzini@...hat.com>,
        Christoffer Dall <cdall@...aro.org>,
        Marc Zyngier <marc.zyngier@....com>,
        Christian Borntraeger <borntraeger@...ibm.com>,
        James Hogan <james.hogan@...tec.com>,
        Paul Mackerras <paulus@...abs.org>,
        Alexander Graf <agraf@...e.com>
Subject: Re: [PATCH RFC v3 7/9] KVM: add kvm_free_vcpus and
 kvm_arch_free_vcpus

On Tue, 22 Aug 2017 16:18:59 +0200
David Hildenbrand <david@...hat.com> wrote:

> > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> > index 33a15e176927..0d2d8b0c785c 100644
> > --- a/virt/kvm/kvm_main.c
> > +++ b/virt/kvm/kvm_main.c
> > @@ -750,6 +750,23 @@ static void kvm_destroy_devices(struct kvm *kvm)
> >  	}
> >  }
> >  
> > +void kvm_free_vcpus(struct kvm *kvm)
> > +{
> > +	int i;
> > +
> > +	kvm_arch_free_vcpus(kvm);  
> 
> I wonder if it would be possible to get rid of kvm_arch_free_vcpus(kvm)
> completely and simply call
> 
> kvm_for_each_vcpu(i, vcpu, kvm)
> 	kvm_arch_vcpu_free(vcpu);
> 
> at that point.
> 
> Would certainly require some refactoring, and I am not sure if we could
> modify the special mmu handling for x86 ("Unpin any mmu pages first.").
> But if in doubt, that part could be moved to kvm_arch_destroy_vm(), just
> before calling kvm_free_vcpus().

Nod, that crossed my mind as well. Would avoid adding lots of
kvm_arch_free_vcpus() that do the same thing for many archs.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ