|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] error when pass through device to guest with qemu-xen-dir-remote
Anthony PERARD wrote on 2012-09-18:
>
> Hi,
>
> So, we'll have to add a check in the unplug code of qemu to ignore
> passthrough devices.
>
> Here is a patches, I did not test it.
>
> diff --git a/hw/xen_platform.c b/hw/xen_platform.c
> index 0d6c2ff..2d3978e 100644
> --- a/hw/xen_platform.c
> +++ b/hw/xen_platform.c
> @@ -85,8 +85,10 @@ static void log_writeb ...
>
> static void unplug_nic(PCIBus *b, PCIDevice *d, void *o)
> {
> + /* We have to ignore passthrough devices */
> if (pci_get_word(d->config + PCI_CLASS_DEVICE) ==
> - PCI_CLASS_NETWORK_ETHERNET) {
> + PCI_CLASS_NETWORK_ETHERNET
> + && strcmp(d->name, "xen-pci-passthrough") != 0) {
> qdev_free(&d->qdev);
> }
> }
In old qemu, we will free the invalid NIC through this function. And it will
fail w/ your change. Shouldn't we follow the old logic?
Best regards,
Yang
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |