From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQuma-0004KY-R5 for qemu-devel@nongnu.org; Thu, 26 Feb 2015 04:31:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQumW-0007tR-Ou for qemu-devel@nongnu.org; Thu, 26 Feb 2015 04:31:00 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:9408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQumW-0007qx-05 for qemu-devel@nongnu.org; Thu, 26 Feb 2015 04:30:56 -0500 From: "Gaohaifeng (A)" Date: Thu, 26 Feb 2015 09:30:40 +0000 Message-ID: <47CEA9C0E570484FBF22EF0D7EBCE5B534A4984F@szxema505-mbs.china.huawei.com> Content-Language: zh-CN Content-Type: multipart/alternative; boundary="_000_47CEA9C0E570484FBF22EF0D7EBCE5B534A4984Fszxema505mbschi_" MIME-Version: 1.0 Subject: [Qemu-devel] [Question] about vhost user Interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org" Cc: "pbonzini@redhat.com" , "Lilijun (Jerry)" , "mst@redhat.com" --_000_47CEA9C0E570484FBF22EF0D7EBCE5B534A4984Fszxema505mbschi_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi I want to use pxe to install a guest os whose nic type is vhost user. How= ever 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_qu= ery_guest_notifiers -> msix_enabled In my test, I remove the msix check for vhost user interface and successful= ly install the guest os by pxe. Is it OK to do like this and will it cause other problems? Thanks. Haifeng Gao --_000_47CEA9C0E570484FBF22EF0D7EBCE5B534A4984Fszxema505mbschi_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi

  I want to use pxe t= o install a guest os whose nic type is vhost user. However pxe rom doesn= 217;t support msi-x interrupt, so qemu won’t start vhost net.

Call relationship:

virtio_net_vhost_status-> vh= ost_net_query-> vhost_dev_query-> virtio_pci_query_guest_notifiers -&= gt; msix_enabled

 

In my test, I remove the msix c= heck for vhost user interface and successfully install the guest os by pxe.=

Is it OK to do like this and wi= ll it cause other problems?

 

Thanks.

Haifeng Gao

--_000_47CEA9C0E570484FBF22EF0D7EBCE5B534A4984Fszxema505mbschi_-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQus5-0001kU-Vv for qemu-devel@nongnu.org; Thu, 26 Feb 2015 04:36:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQus1-0001Yk-PQ for qemu-devel@nongnu.org; Thu, 26 Feb 2015 04:36:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQus1-0001YY-I0 for qemu-devel@nongnu.org; Thu, 26 Feb 2015 04:36:37 -0500 Date: Thu, 26 Feb 2015 10:36:25 +0100 From: "Michael S. Tsirkin" Message-ID: <20150226093625.GA24766@redhat.com> References: <47CEA9C0E570484FBF22EF0D7EBCE5B534A4984F@szxema505-mbs.china.huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <47CEA9C0E570484FBF22EF0D7EBCE5B534A4984F@szxema505-mbs.china.huawei.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Question] about vhost user Interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 >=20 > I want to use pxe to install a guest os whose nic type is vhost user.= However > pxe rom doesn=E2=80=99t support msi-x interrupt, so qemu won=E2=80=99t = start vhost net. >=20 > Call relationship: >=20 > virtio_net_vhost_status-> vhost_net_query-> vhost_dev_query-> > virtio_pci_query_guest_notifiers -> msix_enabled >=20 > =20 >=20 > In my test, I remove the msix check for vhost user interface and succes= sfully > install the guest os by pxe. >=20 > Is it OK to do like this and will it cause other problems? >=20 > =20 >=20 > Thanks. >=20 > Haifeng Gao >=20 I think we should fix it. As a quick hack, you should be able to just use vhostforce. --=20 MST From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQx3W-0005qf-PL for qemu-devel@nongnu.org; Thu, 26 Feb 2015 06:56:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQx3T-0008R4-Us for qemu-devel@nongnu.org; Thu, 26 Feb 2015 06:56:38 -0500 Received: from mail-qg0-f48.google.com ([209.85.192.48]:63129) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQx3T-0008Qy-Qa for qemu-devel@nongnu.org; Thu, 26 Feb 2015 06:56:35 -0500 Received: by mail-qg0-f48.google.com with SMTP id l89so1899913qgf.7 for ; Thu, 26 Feb 2015 03:56:35 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20150226093625.GA24766@redhat.com> References: <47CEA9C0E570484FBF22EF0D7EBCE5B534A4984F@szxema505-mbs.china.huawei.com> <20150226093625.GA24766@redhat.com> From: Nikolay Nikolaev Date: Thu, 26 Feb 2015 13:55:54 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Question] about vhost user Interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 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=E2=80=99t support msi-x interrupt, so qemu won=E2=80=99t = 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 succes= sfully > > 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 > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQx8q-0005Ag-Tp for qemu-devel@nongnu.org; Thu, 26 Feb 2015 07:02:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQx8m-0001jk-1t for qemu-devel@nongnu.org; Thu, 26 Feb 2015 07:02:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQx8l-0001jY-QH for qemu-devel@nongnu.org; Thu, 26 Feb 2015 07:02:04 -0500 Date: Thu, 26 Feb 2015 13:01:53 +0100 From: "Michael S. Tsirkin" Message-ID: <20150226120153.GA31740@redhat.com> References: <47CEA9C0E570484FBF22EF0D7EBCE5B534A4984F@szxema505-mbs.china.huawei.com> <20150226093625.GA24766@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Question] about vhost user Interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 w= rote: > > > > 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 u= ser. However > > > pxe rom doesn=E2=80=99t support msi-x interrupt, so qemu won=E2=80=99= 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 su= ccessfully > > > 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. >=20 >=20 > But isn't that what vhostforce is for, runnign vhost with non > MSI-enabled guests? >=20 > 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 > > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRGaV-0004bM-Ph for qemu-devel@nongnu.org; Fri, 27 Feb 2015 03:48:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YRGaQ-0002U4-7n for qemu-devel@nongnu.org; Fri, 27 Feb 2015 03:47:59 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:30228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRGaP-0002TE-Ei for qemu-devel@nongnu.org; Fri, 27 Feb 2015 03:47:54 -0500 Message-ID: <54F02F14.5040802@huawei.com> Date: Fri, 27 Feb 2015 16:47:16 +0800 From: gaohaifeng MIME-Version: 1.0 References: <47CEA9C0E570484FBF22EF0D7EBCE5B534A4984F@szxema505-mbs.china.huawei.com> <20150226093625.GA24766@redhat.com> <20150226120153.GA31740@redhat.com> In-Reply-To: <20150226120153.GA31740@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [Question] about vhost user Interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 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 >>> > > . >