From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: get a handle for the tap device to shut it down Date: Fri, 28 Nov 2014 16:47:49 +0100 Message-ID: <20141128154749.GA6749@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: qemu-devel@nongnu.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Xen does a shutdown of the emulated PCI network device in pci_unplug_nics. But this just disables the PCI device. The tap device for a given emulated card remains active because nothing closes the file descriptor. The cmdline for qemu contains something like "-device rtl8139,id=nic0,netdev=net0,mac=00:16:3e:28:f1:ee -netdev type=tap,id=net0,ifname=vif1.0-emu,script=no,downscript=no". I wonder if the missing disable of the tap device is intentional, or just an oversight, or if its just to complicated to get from a "PCIDevice *" to the other end and call the ->cleanup function. Olaf