diff options
author | Peter Maydell | 2017-07-10 11:29:11 +0200 |
---|---|---|
committer | Peter Maydell | 2017-07-10 11:29:11 +0200 |
commit | 77d472291812cf04f97974dadbda767e59e31fde (patch) | |
tree | 50dd98f02bd609d870d0d49460749b07a7462018 /hw/i386/xen/xen_platform.c | |
parent | Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20170706' into s... (diff) | |
parent | xen/pt: Fixup addr validation in xen_pt_pci_config_access_check (diff) | |
download | qemu-77d472291812cf04f97974dadbda767e59e31fde.tar.gz qemu-77d472291812cf04f97974dadbda767e59e31fde.tar.xz qemu-77d472291812cf04f97974dadbda767e59e31fde.zip |
Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20170707-tag' into staging
Xen 2017/07/07
# gpg: Signature made Fri 07 Jul 2017 19:21:22 BST
# gpg: using RSA key 0x894F8F4870E1AE90
# gpg: Good signature from "Stefano Stabellini <stefano.stabellini@eu.citrix.com>"
# gpg: aka "Stefano Stabellini <sstabellini@kernel.org>"
# Primary key fingerprint: D04E 33AB A51F 67BA 07D3 0AEA 894F 8F48 70E1 AE90
* remotes/sstabellini/tags/xen-20170707-tag:
xen/pt: Fixup addr validation in xen_pt_pci_config_access_check
xen-platform: Cleanup network infrastructure when emulated NICs are unplugged
xenfb: remove xen_init_display "temporary" hack
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/i386/xen/xen_platform.c')
-rw-r--r-- | hw/i386/xen/xen_platform.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c index 1419fc96d2..f23155832b 100644 --- a/hw/i386/xen/xen_platform.c +++ b/hw/i386/xen/xen_platform.c @@ -102,8 +102,19 @@ static void unplug_nic(PCIBus *b, PCIDevice *d, void *o) } } +/* Remove the peer of the NIC device. Normally, this would be a tap device. */ +static void del_nic_peer(NICState *nic, void *opaque) +{ + NetClientState *nc; + + nc = qemu_get_queue(nic); + if (nc->peer) + qemu_del_net_client(nc->peer); +} + static void pci_unplug_nics(PCIBus *bus) { + qemu_foreach_nic(del_nic_peer, NULL); pci_for_each_device(bus, 0, unplug_nic, NULL); } |