Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel

error when pass through device to guest with qemu-xen-dir-remote

 

 

Xen devel RSS feed   Index | Next | Previous | View Threaded


yang.z.zhang at intel

Aug 2, 2012, 7:59 PM

Post #1 of 9 (581 views)
Permalink
error when pass through device to guest with qemu-xen-dir-remote

When create guest with device assigned, it shows the error and the device wasn't able to work inside guest:
libxl: error: libxl_qmp.c:288:qmp_handle_error_response: received an error message from QMP server: Parameter 'driver' expects a driver name

It only fails with qemu-xen-dir-remote(Is this tree more close to upstream qemu?). I don't see the error with the traditional Qemu.
I also tried qemu-upstream, but it fails when I try to enable pci pass-through for xen. I think Anthony's patch to add pci pass-through support for Xen is accepted by qemu-upstream, am I right?

Another question:
Now I am trying to add some features (relevant to pass through device) to Qemu, which tree should I use? Since traditional qemu is great different from qemu-upstream, it is too old to develop patch base on it. But besides the old one, I cannot find a working qemu.

best regards
yang

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


stefano.stabellini at eu

Aug 3, 2012, 3:29 AM

Post #2 of 9 (557 views)
Permalink
Re: error when pass through device to guest with qemu-xen-dir-remote [In reply to]

On Fri, 3 Aug 2012, Zhang, Yang Z wrote:
> When create guest with device assigned, it shows the error and the device wasn't able to work inside guest:
> libxl: error: libxl_qmp.c:288:qmp_handle_error_response: received an error message from QMP server: Parameter 'driver' expects a driver name
>
> It only fails with qemu-xen-dir-remote(Is this tree more close to upstream qemu?). I don't see the error with the traditional Qemu.
> I also tried qemu-upstream, but it fails when I try to enable pci pass-through for xen. I think Anthony's patch to add pci pass-through support for Xen is accepted by qemu-upstream, am I right?

Yes, it was accepted, but it is present only in upstream QEMU (from
git://git.qemu.org/qemu.git), not the tree we are currently using in
xen-unstable for development
(git://xenbits.xensource.com/qemu-upstream-unstable.git).
Make sure you are using the right tree!

Anthony is currently on vacation and is going to be back in about a
week.

> Another question:
> Now I am trying to add some features (relevant to pass through device) to Qemu, which tree should I use? Since traditional qemu is great different from qemu-upstream, it is too old to develop patch base on it. But besides the old one, I cannot find a working qemu.

You should use upstream QEMU, I am going to rebase our tree on that
early on in the 4.3 release cycle.

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

Aug 3, 2012, 3:36 AM

Post #3 of 9 (556 views)
Permalink
Re: error when pass through device to guest with qemu-xen-dir-remote [In reply to]

On Fri, 2012-08-03 at 11:29 +0100, Stefano Stabellini wrote:
> On Fri, 3 Aug 2012, Zhang, Yang Z wrote:
> > When create guest with device assigned, it shows the error and the device wasn't able to work inside guest:
> > libxl: error: libxl_qmp.c:288:qmp_handle_error_response: received an error message from QMP server: Parameter 'driver' expects a driver name
> >
> > It only fails with qemu-xen-dir-remote(Is this tree more close to upstream qemu?). I don't see the error with the traditional Qemu.
> > I also tried qemu-upstream, but it fails when I try to enable pci pass-through for xen. I think Anthony's patch to add pci pass-through support for Xen is accepted by qemu-upstream, am I right?
>
> Yes, it was accepted, but it is present only in upstream QEMU (from
> git://git.qemu.org/qemu.git), not the tree we are currently using in
> xen-unstable for development
> (git://xenbits.xensource.com/qemu-upstream-unstable.git).
> Make sure you are using the right tree!

http://wiki.xen.org/wiki/QEMU_Upstream has some notes on how to use the
upstream qemu tree instead of our stable branch of upstream.

>
> Anthony is currently on vacation and is going to be back in about a
> week.
>
> > Another question:
> > Now I am trying to add some features (relevant to pass through device) to Qemu, which tree should I use? Since traditional qemu is great different from qemu-upstream, it is too old to develop patch base on it. But besides the old one, I cannot find a working qemu.
>
> You should use upstream QEMU, I am going to rebase our tree on that
> early on in the 4.3 release cycle.



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


chao.zhou at intel

Aug 8, 2012, 11:49 PM

Post #4 of 9 (547 views)
Permalink
Re: error when pass through device to guest with qemu-xen-dir-remote [In reply to]

I rebuild the upstream QEMU according to the wiki, but device static assignment doesn't work, no lspci output in guest. However hotplug & unplug works fine.

-----Original Message-----
From: xen-devel-bounces [at] lists [mailto:xen-devel-bounces [at] lists] On Behalf Of Ian Campbell
Sent: Friday, August 03, 2012 6:36 PM
To: Stefano Stabellini
Cc: Zhang, Yang Z; Anthony Perard; xen-devel
Subject: Re: [Xen-devel] error when pass through device to guest with qemu-xen-dir-remote

On Fri, 2012-08-03 at 11:29 +0100, Stefano Stabellini wrote:
> On Fri, 3 Aug 2012, Zhang, Yang Z wrote:
> > When create guest with device assigned, it shows the error and the device wasn't able to work inside guest:
> > libxl: error: libxl_qmp.c:288:qmp_handle_error_response: received an
> > error message from QMP server: Parameter 'driver' expects a driver
> > name
> >
> > It only fails with qemu-xen-dir-remote(Is this tree more close to upstream qemu?). I don't see the error with the traditional Qemu.
> > I also tried qemu-upstream, but it fails when I try to enable pci pass-through for xen. I think Anthony's patch to add pci pass-through support for Xen is accepted by qemu-upstream, am I right?
>
> Yes, it was accepted, but it is present only in upstream QEMU (from
> git://git.qemu.org/qemu.git), not the tree we are currently using in
> xen-unstable for development
> (git://xenbits.xensource.com/qemu-upstream-unstable.git).
> Make sure you are using the right tree!

http://wiki.xen.org/wiki/QEMU_Upstream has some notes on how to use the upstream qemu tree instead of our stable branch of upstream.

>
> Anthony is currently on vacation and is going to be back in about a
> week.
>
> > Another question:
> > Now I am trying to add some features (relevant to pass through device) to Qemu, which tree should I use? Since traditional qemu is great different from qemu-upstream, it is too old to develop patch base on it. But besides the old one, I cannot find a working qemu.
>
> You should use upstream QEMU, I am going to rebase our tree on that
> early on in the 4.3 release cycle.



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


yang.z.zhang at intel

Aug 13, 2012, 6:17 PM

Post #5 of 9 (537 views)
Permalink
Re: error when pass through device to guest with qemu-xen-dir-remote [In reply to]

Zhou, Chao wrote on 2012-08-09:
> I rebuild the upstream QEMU according to the wiki, but device static assignment
> doesn't work, no lspci output in guest. However hotplug & unplug works fine.

Hi Anthony,

We cannot see the device(via lspci) after guest boot up with upstream QEMU. Did you see the same problem?
We follow the steps from wiki to build QEMU upstream and do the device assignment through old way(1. hide the device, 2 set the bdf in config file).

> -----Original Message----- From: xen-devel-bounces [at] lists
> [mailto:xen-devel-bounces [at] lists] On Behalf Of Ian Campbell Sent:
> Friday, August 03, 2012 6:36 PM To: Stefano Stabellini Cc: Zhang, Yang
> Z; Anthony Perard; xen-devel Subject: Re: [Xen-devel] error when pass
> through device to guest with qemu-xen-dir-remote
>
> On Fri, 2012-08-03 at 11:29 +0100, Stefano Stabellini wrote:
>> On Fri, 3 Aug 2012, Zhang, Yang Z wrote:
>>> When create guest with device assigned, it shows the error and the
>>> device wasn't able to work inside guest: libxl: error:
>>> libxl_qmp.c:288:qmp_handle_error_response: received an error message
>>> from QMP server: Parameter 'driver' expects a driver name
>>>
>>> It only fails with qemu-xen-dir-remote(Is this tree more close to
>>> upstream qemu?). I don't see the error with the traditional Qemu. I
>>> also tried qemu-upstream, but it fails when I try to enable pci
>>> pass-through
> for xen. I think Anthony's patch to add pci pass-through support for Xen is
> accepted by qemu-upstream, am I right?
>>
>> Yes, it was accepted, but it is present only in upstream QEMU (from
>> git://git.qemu.org/qemu.git), not the tree we are currently using in
>> xen-unstable for development
>> (git://xenbits.xensource.com/qemu-upstream-unstable.git).
>> Make sure you are using the right tree!
>
> http://wiki.xen.org/wiki/QEMU_Upstream has some notes on how to use the
> upstream qemu tree instead of our stable branch of upstream.
>
>>
>> Anthony is currently on vacation and is going to be back in about a
>> week.
>>
>>> Another question:
>>> Now I am trying to add some features (relevant to pass through device) to
> Qemu, which tree should I use? Since traditional qemu is great different from
> qemu-upstream, it is too old to develop patch base on it. But besides the old one,
> I cannot find a working qemu.
>>
>> You should use upstream QEMU, I am going to rebase our tree on that
>> early on in the 4.3 release cycle.
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel [at] lists
> http://lists.xen.org/xen-devel


Best regards,
Yang



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


anthony.perard at citrix

Aug 22, 2012, 3:54 AM

Post #6 of 9 (525 views)
Permalink
Re: error when pass through device to guest with qemu-xen-dir-remote [In reply to]

On Wed, Aug 22, 2012 at 6:56 AM, Shan, Haitao <haitao.shan [at] intel> wrote:
> Do we have any conclusion on this? A bug?
> We are trying to contribute codes to Xen. However, this bug has blocked us for some time. It would be great to see this fixed.

I just try to start a guest with a network card passthrough, and it
seams to work fine (the card is present in `lspci`). Maybe having some
debug could help to understand the issue. Try to run `xl -vvv create
....`.

Regards,

--
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


anthony.perard at citrix

Sep 19, 2012, 3:38 AM

Post #7 of 9 (505 views)
Permalink
Re: error when pass through device to guest with qemu-xen-dir-remote [In reply to]

On Wed, Sep 19, 2012 at 1:06 AM, Zhang, Yang Z <yang.z.zhang [at] intel> wrote:
> 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?

I don't understand. Are you arguing this patch or the function it self?

My change is fine and follow the old logic: do not do anything for a
passthrough device.

I now have tested the change, and QEMU work as espected, it will
unplug the emulated NIC, and ignore any passthrough devices. So the
guest can the passthroughed NIC.

Thanks,

--
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


yang.z.zhang at intel

Sep 19, 2012, 4:30 PM

Post #8 of 9 (506 views)
Permalink
Re: error when pass through device to guest with qemu-xen-dir-remote [In reply to]

Anthony PERARD wrote on 2012-09-19:
> On Wed, Sep 19, 2012 at 1:06 AM, Zhang, Yang Z <yang.z.zhang [at] intel>
> wrote:
>> 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?
>
> I don't understand. Are you arguing this patch or the function it self?
>
> My change is fine and follow the old logic: do not do anything for a
> passthrough device.
No. Old logic will unplug the passthrough device which mask as invalid. And this patch just ignores all passthrough device.
I wonder whether this change will impact other part? If not, it should be ok.

> I now have tested the change, and QEMU work as espected, it will
> unplug the emulated NIC, and ignore any passthrough devices. So the
> guest can the passthroughed NIC.
>
> Thanks,
>
> --
> Anthony PERARD


Best regards,
Yang


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


anthony.perard at citrix

Sep 20, 2012, 3:56 AM

Post #9 of 9 (511 views)
Permalink
Re: error when pass through device to guest with qemu-xen-dir-remote [In reply to]

On Thu, Sep 20, 2012 at 12:30 AM, Zhang, Yang Z <yang.z.zhang [at] intel> wrote:
>>> 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?
>>
>> I don't understand. Are you arguing this patch or the function it self?
>>
>> My change is fine and follow the old logic: do not do anything for a
>> passthrough device.
> No. Old logic will unplug the passthrough device which mask as invalid. And this patch just ignores all passthrough device.

I probably miss something in qemu-traditional then.

Anyway ...

> I wonder whether this change will impact other part? If not, it should be ok.

This should not have any impact on any other part of QEMU.

Regards,

--
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel

Xen devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.