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: Thu, 09 Aug 2012 09:40:10 +0200 Message-ID: <5023695A.80002@redhat.com> References: <1344407156-25562-1-git-send-email-qemulist@gmail.com> <1344407156-25562-16-git-send-email-qemulist@gmail.com> <502237CE.1020206@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 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-1?Q?Andreas_F=E4rber?= To: liu ping fan Return-path: Received: from mail-gh0-f174.google.com ([209.85.160.174]:61734 "EHLO mail-gh0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754073Ab2HIHkU (ORCPT ); Thu, 9 Aug 2012 03:40:20 -0400 Received: by ghrr11 with SMTP id r11so126346ghr.19 for ; Thu, 09 Aug 2012 00:40:19 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Il 09/08/2012 09:28, 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. >> > > Refer to 0013-hotplug-introduce-qdev_unplug_complete-to-remove-dev.patch, > we have the following sequence > qdev_unmap->pci_unmap_device->pci_e1000_unmap. So pci_e1000_unmap > need not to do anything. But then this patch is unnecessary, isn't it? Paolo From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzNLx-0001Yz-7K for qemu-devel@nongnu.org; Thu, 09 Aug 2012 03:40:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzNLw-0003Ze-Bq for qemu-devel@nongnu.org; Thu, 09 Aug 2012 03:40:21 -0400 Received: from mail-gg0-f173.google.com ([209.85.161.173]:45644) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzNLw-0003ZX-6l for qemu-devel@nongnu.org; Thu, 09 Aug 2012 03:40:20 -0400 Received: by ggna5 with SMTP id a5so128378ggn.4 for ; Thu, 09 Aug 2012 00:40:19 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5023695A.80002@redhat.com> Date: Thu, 09 Aug 2012 09:40:10 +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> <502237CE.1020206@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 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-1?Q?Andreas_F=E4rber?= Il 09/08/2012 09:28, 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. >> > > Refer to 0013-hotplug-introduce-qdev_unplug_complete-to-remove-dev.patch, > we have the following sequence > qdev_unmap->pci_unmap_device->pci_e1000_unmap. So pci_e1000_unmap > need not to do anything. But then this patch is unnecessary, isn't it? Paolo