From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 15/15] e1000: using new interface--unmap to unplug Date: Wed, 08 Aug 2012 11:56:30 +0200 Message-ID: <502237CE.1020206@redhat.com> References: <1344407156-25562-1-git-send-email-qemulist@gmail.com> <1344407156-25562-16-git-send-email-qemulist@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Anthony Liguori , Avi Kivity , Jan Kiszka , Marcelo Tosatti , Stefan Hajnoczi , Blue Swirl , =?ISO-8859-15?Q?Andreas_F=E4rber?= To: Liu Ping Fan Return-path: Received: from mx1.redhat.com ([209.132.183.28]:23047 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751699Ab2HHJ4m (ORCPT ); Wed, 8 Aug 2012 05:56:42 -0400 In-Reply-To: <1344407156-25562-16-git-send-email-qemulist@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 08/08/2012 08:25, Liu Ping Fan ha scritto: > > +static void > +pci_e1000_unmap(PCIDevice *p) > +{ > + /* DO NOT FREE anything!until refcnt=0 */ > + /* isolate from memory view */ > +} At least you need to call the superclass method. Paolo > static int > pci_e1000_uninit(PCIDevice *dev) > { > @@ -1275,6 +1282,7 @@ static void e1000_class_init(ObjectClass *klass, void *data) > PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); > > k->init = pci_e1000_init; > + k->unmap = pci_e1000_unmap; > k->exit = pci_e1000_uninit; > k->romfile = "pxe-e1000.rom"; > k->vendor_id = PCI_VENDOR_ID_INTEL; From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sz30M-000858-K3 for qemu-devel@nongnu.org; Wed, 08 Aug 2012 05:56:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sz30J-0006tR-Ol for qemu-devel@nongnu.org; Wed, 08 Aug 2012 05:56:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sz30J-0006tN-GX for qemu-devel@nongnu.org; Wed, 08 Aug 2012 05:56:39 -0400 Message-ID: <502237CE.1020206@redhat.com> Date: Wed, 08 Aug 2012 11:56:30 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1344407156-25562-1-git-send-email-qemulist@gmail.com> <1344407156-25562-16-git-send-email-qemulist@gmail.com> In-Reply-To: <1344407156-25562-16-git-send-email-qemulist@gmail.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 15/15] e1000: using new interface--unmap to unplug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Ping Fan Cc: kvm@vger.kernel.org, Jan Kiszka , Marcelo Tosatti , qemu-devel@nongnu.org, Blue Swirl , Avi Kivity , Anthony Liguori , Stefan Hajnoczi , =?ISO-8859-15?Q?Andreas_F=E4rber?= Il 08/08/2012 08:25, Liu Ping Fan ha scritto: > > +static void > +pci_e1000_unmap(PCIDevice *p) > +{ > + /* DO NOT FREE anything!until refcnt=0 */ > + /* isolate from memory view */ > +} At least you need to call the superclass method. Paolo > static int > pci_e1000_uninit(PCIDevice *dev) > { > @@ -1275,6 +1282,7 @@ static void e1000_class_init(ObjectClass *klass, void *data) > PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); > > k->init = pci_e1000_init; > + k->unmap = pci_e1000_unmap; > k->exit = pci_e1000_uninit; > k->romfile = "pxe-e1000.rom"; > k->vendor_id = PCI_VENDOR_ID_INTEL;