* [Qemu-devel] [Question] about vhost user Interface
@ 2015-02-26 9:30 Gaohaifeng (A)
2015-02-26 9:36 ` Michael S. Tsirkin
0 siblings, 1 reply; 5+ messages in thread
From: Gaohaifeng (A) @ 2015-02-26 9:30 UTC (permalink / raw)
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, Lilijun (Jerry), mst@redhat.com
[-- Attachment #1: Type: text/plain, Size: 483 bytes --]
Hi
I want to use pxe to install a guest os whose nic type is vhost user. However pxe rom doesn't support msi-x interrupt, so qemu won't start vhost net.
Call relationship:
virtio_net_vhost_status-> vhost_net_query-> vhost_dev_query-> virtio_pci_query_guest_notifiers -> msix_enabled
In my test, I remove the msix check for vhost user interface and successfully install the guest os by pxe.
Is it OK to do like this and will it cause other problems?
Thanks.
Haifeng Gao
[-- Attachment #2: Type: text/html, Size: 2985 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [Question] about vhost user Interface
2015-02-26 9:30 [Qemu-devel] [Question] about vhost user Interface Gaohaifeng (A)
@ 2015-02-26 9:36 ` Michael S. Tsirkin
2015-02-26 11:55 ` Nikolay Nikolaev
0 siblings, 1 reply; 5+ messages in thread
From: Michael S. Tsirkin @ 2015-02-26 9:36 UTC (permalink / raw)
To: Gaohaifeng (A)
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, Lilijun (Jerry)
On Thu, Feb 26, 2015 at 09:30:40AM +0000, Gaohaifeng (A) wrote:
> Hi
>
> I want to use pxe to install a guest os whose nic type is vhost user. However
> pxe rom doesn’t support msi-x interrupt, so qemu won’t start vhost net.
>
> Call relationship:
>
> virtio_net_vhost_status-> vhost_net_query-> vhost_dev_query->
> virtio_pci_query_guest_notifiers -> msix_enabled
>
>
>
> In my test, I remove the msix check for vhost user interface and successfully
> install the guest os by pxe.
>
> Is it OK to do like this and will it cause other problems?
>
>
>
> Thanks.
>
> Haifeng Gao
>
I think we should fix it.
As a quick hack, you should be able to just use vhostforce.
--
MST
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [Question] about vhost user Interface
2015-02-26 9:36 ` Michael S. Tsirkin
@ 2015-02-26 11:55 ` Nikolay Nikolaev
2015-02-26 12:01 ` Michael S. Tsirkin
0 siblings, 1 reply; 5+ messages in thread
From: Nikolay Nikolaev @ 2015-02-26 11:55 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: pbonzini@redhat.com, Gaohaifeng (A), qemu-devel@nongnu.org,
Lilijun (Jerry)
On Thu, Feb 26, 2015 at 11:36 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Thu, Feb 26, 2015 at 09:30:40AM +0000, Gaohaifeng (A) wrote:
> > Hi
> >
> > I want to use pxe to install a guest os whose nic type is vhost user. However
> > pxe rom doesn’t support msi-x interrupt, so qemu won’t start vhost net.
> >
> > Call relationship:
> >
> > virtio_net_vhost_status-> vhost_net_query-> vhost_dev_query->
> > virtio_pci_query_guest_notifiers -> msix_enabled
> >
> >
> >
> > In my test, I remove the msix check for vhost user interface and successfully
> > install the guest os by pxe.
> >
> > Is it OK to do like this and will it cause other problems?
> >
> >
> >
> > Thanks.
> >
> > Haifeng Gao
> >
>
> I think we should fix it.
> As a quick hack, you should be able to just use vhostforce.
But isn't that what vhostforce is for, runnign vhost with non
MSI-enabled guests?
regards,
Nikolay Nikolaev
>
>
> --
> MST
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [Question] about vhost user Interface
2015-02-26 11:55 ` Nikolay Nikolaev
@ 2015-02-26 12:01 ` Michael S. Tsirkin
2015-02-27 8:47 ` gaohaifeng
0 siblings, 1 reply; 5+ messages in thread
From: Michael S. Tsirkin @ 2015-02-26 12:01 UTC (permalink / raw)
To: Nikolay Nikolaev
Cc: pbonzini@redhat.com, Gaohaifeng (A), qemu-devel@nongnu.org,
Lilijun (Jerry)
On Thu, Feb 26, 2015 at 01:55:54PM +0200, Nikolay Nikolaev wrote:
> On Thu, Feb 26, 2015 at 11:36 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > On Thu, Feb 26, 2015 at 09:30:40AM +0000, Gaohaifeng (A) wrote:
> > > Hi
> > >
> > > I want to use pxe to install a guest os whose nic type is vhost user. However
> > > pxe rom doesn’t support msi-x interrupt, so qemu won’t start vhost net.
> > >
> > > Call relationship:
> > >
> > > virtio_net_vhost_status-> vhost_net_query-> vhost_dev_query->
> > > virtio_pci_query_guest_notifiers -> msix_enabled
> > >
> > >
> > >
> > > In my test, I remove the msix check for vhost user interface and successfully
> > > install the guest os by pxe.
> > >
> > > Is it OK to do like this and will it cause other problems?
> > >
> > >
> > >
> > > Thanks.
> > >
> > > Haifeng Gao
> > >
> >
> > I think we should fix it.
> > As a quick hack, you should be able to just use vhostforce.
>
>
> But isn't that what vhostforce is for, runnign vhost with non
> MSI-enabled guests?
>
> regards,
> Nikolay Nikolaev
It isn't really.
kernel vhost is more or less an optimization. since it performs
slowly for non msi guests, it turns itself off for them by default,
and you fall back to virtio in qemu which for non msi seems to be
faster. to re-enable, set force to on.
vhost user doesn't work with virtio in qemu, it should
ignore vhostforce and just handle non msix guests.
> >
> >
> > --
> > MST
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [Question] about vhost user Interface
2015-02-26 12:01 ` Michael S. Tsirkin
@ 2015-02-27 8:47 ` gaohaifeng
0 siblings, 0 replies; 5+ messages in thread
From: gaohaifeng @ 2015-02-27 8:47 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, Nikolay Nikolaev,
Lilijun (Jerry)
On 2015/2/26 20:01, Michael S. Tsirkin wrote:
> On Thu, Feb 26, 2015 at 01:55:54PM +0200, Nikolay Nikolaev wrote:
>> On Thu, Feb 26, 2015 at 11:36 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
>>>
>>> On Thu, Feb 26, 2015 at 09:30:40AM +0000, Gaohaifeng (A) wrote:
>>>> Hi
>>>>
>>>> I want to use pxe to install a guest os whose nic type is vhost user. However
>>>> pxe rom doesn’t support msi-x interrupt, so qemu won’t start vhost net.
>>>>
>>>> Call relationship:
>>>>
>>>> virtio_net_vhost_status-> vhost_net_query-> vhost_dev_query->
>>>> virtio_pci_query_guest_notifiers -> msix_enabled
>>>>
>>>>
>>>>
>>>> In my test, I remove the msix check for vhost user interface and successfully
>>>> install the guest os by pxe.
>>>>
>>>> Is it OK to do like this and will it cause other problems?
>>>>
>>>>
>>>>
>>>> Thanks.
>>>>
>>>> Haifeng Gao
>>>>
>>>
>>> I think we should fix it.
>>> As a quick hack, you should be able to just use vhostforce.
>>
>>
>> But isn't that what vhostforce is for, runnign vhost with non
>> MSI-enabled guests?
>>
>> regards,
>> Nikolay Nikolaev
>
> It isn't really.
>
> kernel vhost is more or less an optimization. since it performs
> slowly for non msi guests, it turns itself off for them by default,
> and you fall back to virtio in qemu which for non msi seems to be
> faster. to re-enable, set force to on.
>
> vhost user doesn't work with virtio in qemu, it should
> ignore vhostforce and just handle non msix guests.
If I understand correctly (if not,pls correct me), We can ignore vhostforce value and set it to true. So even non msix can use vhost user nic.
code like this:
--- vhost-user.c
+++ vhost-user.c
@@ -230,7 +230,6 @@
{
const NetdevVhostUserOptions *vhost_user_opts;
CharDriverState *chr;
- bool vhostforce;
assert(opts->kind == NET_CLIENT_OPTIONS_KIND_VHOST_USER);
vhost_user_opts = opts->vhost_user;
@@ -247,12 +247,6 @@
return -1;
}
- /* vhostforce for non-MSIX */
- if (vhost_user_opts->has_vhostforce) {
- vhostforce = vhost_user_opts->vhostforce;
- } else {
- vhostforce = false;
- }
- return net_vhost_user_init(peer, "vhost_user", name, chr, vhostforce);
+ return net_vhost_user_init(peer, "vhost_user", name, chr, true);
}
>
>
>
>>>
>>>
>>> --
>>> MST
>>>
>
> .
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-02-27 8:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-26 9:30 [Qemu-devel] [Question] about vhost user Interface Gaohaifeng (A)
2015-02-26 9:36 ` Michael S. Tsirkin
2015-02-26 11:55 ` Nikolay Nikolaev
2015-02-26 12:01 ` Michael S. Tsirkin
2015-02-27 8:47 ` gaohaifeng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).