Thanks,I did solve my problem! 2016-12-21 19:00 GMT+08:00 Stefan Hajnoczi <stefanha@xxxxxxxxx>: > On Tue, Dec 20, 2016 at 04:30:35PM +0800, jack.chen wrote: >> Hello,now I alloc a block of memory in KVM for VM,and I need free it >> when VM shutdown,however I do not know when VM shutdown,which fun in >> KVM is called,so can you tell me which fun in which I need to free my >> memory?? > > Take a look at kvm_destroy_vm(). > > You haven't described your use case or posted code so it may not be > exactly right for your needs. > > Stefan -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html