[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] get a handle for the tap device to shut it down
From: |
Olaf Hering |
Subject: |
Re: [Qemu-devel] get a handle for the tap device to shut it down |
Date: |
Tue, 2 Dec 2014 16:53:00 +0100 |
User-agent: |
Mutt/1.5.22.rev6346 (2013-10-29) |
On Fri, Nov 28, Olaf Hering wrote:
> 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.
qemu-traditional did just close all tap devices. With qemu-upstream a
helper function exists to do all the cleanup. I think in a xen guest
there are just emulated network devices, so the "wipe all remaining"
could be done without breaking anything.
What about something like this?
Index: xen-4.4.1-testing/tools/qemu-xen-dir-remote/hw/xen/xen_platform.c
===================================================================
--- xen-4.4.1-testing.orig/tools/qemu-xen-dir-remote/hw/xen/xen_platform.c
+++ xen-4.4.1-testing/tools/qemu-xen-dir-remote/hw/xen/xen_platform.c
@@ -99,9 +99,11 @@ static void unplug_nic(PCIBus *b, PCIDev
}
}
+extern void net_cleanup(void);
static void pci_unplug_nics(PCIBus *bus)
{
pci_for_each_device(bus, 0, unplug_nic, NULL);
+ net_cleanup();
}
static void unplug_disks(PCIBus *b, PCIDevice *d, void *o)
Olaf
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] get a handle for the tap device to shut it down,
Olaf Hering <=