From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fijHe-0007sQ-F6 for qemu-devel@nongnu.org; Thu, 26 Jul 2018 12:38:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fijHZ-0000U1-Rh for qemu-devel@nongnu.org; Thu, 26 Jul 2018 12:38:34 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:47956 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fijHZ-0000SF-K9 for qemu-devel@nongnu.org; Thu, 26 Jul 2018 12:38:29 -0400 Date: Thu, 26 Jul 2018 19:38:26 +0300 From: "Michael S. Tsirkin" Message-ID: <20180726193758-mutt-send-email-mst@kernel.org> References: <1407239306.11199051.1530240887935.JavaMail.zimbra@redhat.com> <20180705194311-mutt-send-email-mst@kernel.org> <20180726145214.GD17777@stefanha-x1.localdomain> <488bdc8d-e36c-ad3e-f7b3-a45a78a99dda@gmail.com> <20180726191315-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Question: SRIOV support over Win Hyper-V VM running in QEMU process on Linux host List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum Cc: Stefan Hajnoczi , Elijah Shakkour , Knut Omang , "qemu-devel@nongnu.org" , Tal Attaly On Thu, Jul 26, 2018 at 07:34:41PM +0300, Marcel Apfelbaum wrote: >=20 >=20 > On 07/26/2018 07:14 PM, Michael S. Tsirkin wrote: > > On Thu, Jul 26, 2018 at 06:51:13PM +0300, Marcel Apfelbaum wrote: > > > Hi > > >=20 > > > On 07/26/2018 05:52 PM, Stefan Hajnoczi wrote: > > > > On Thu, Jul 12, 2018 at 07:33:14AM +0000, Elijah Shakkour wrote: > > > > > Hey, > > > > >=20 > > > > > Our team is adding a NIC functional emulation to QEMU. > > > > > One of the features we are adding to this NIC is SRIOV. > > > > >=20 > > > > > Here is the error message I get when checking SRIOV support of = our emulated NIC on Win2016 server (the hyper-v VM). > > > > > " > > > > > SR-IOV cannot be used on this system as the PCI Express hardwar= e does not support Access Control Services (ACS) at any root port. > > > QEMU's emulated PCI Express Root Ports do not support ACS yet, howe= ver I am > > > not sure ACS is a prerequisite > > > for SR-IOV. > > Looks like windows blocks dev assignment in nested VMs without it. > > Thinking about it, doesn't vfio do the same by default? > vfio requires vIOMMU even for nested, as far as I know. Absolutely. > They do have a > "no-iommu" > option, but I don't know how=A0 it can help in this case. >=20 > Elijah, what about implementing ACS for QEMU's generic PCIe Root Ports? > Maybe is not too complicated and it seems like a handy feature to have > anyway. > Patches would be welcomed :) >=20 > Thanks, > Marcel >=20 > > I think vfio has > > a flag to override this though. > >=20 > > > We would need ARI support for allowing more than 8VFs, but QEMU > > > doesn't support that either (yet). > > >=20 > > > Knut Omag has some working patches, he successfully implemented SR-= IOV with > > > QEMU, see: > > > =A0=A0=A0=A0 https://github.com/knuto/qemu/tree/sriov_patches_v7 > > >=20 > > > The code was not merged since we need at least a device with SR-IOV= support > > > to justify the addition. > > >=20 > > > > > Contact your system vendor for further information. > > > > > " > > > > I'm not sure what the status of emulated SR-IOV is so I have CCed > > > > Michael Tsirkin and Marcel Apfelbaum, the PCI maintainers in QEMU= . > > > Thanks, > > > Marcel > > >=20 > > > > > Could you please advise about what could be the issue here? > > > > >=20 > > > > > BTW: I use same configuration (VM XML file attached) when runni= ng linux VM (RH7.2) image (instead of Win Hyper-V) over the same host and= SRIOV is working for me there. > > > > >=20 > > > > > Here the XML file I use to define the VM (our emulated NIC is a= dded at the end of XML): > > > > > " > > > > > > > > > > nst105 > > > > > 0249a525-2ee2-432b-a1f5-a6db83b089a3 > > > > > 8388608 > > > > > 8388608 > > > > > 8 > > > > > > > > > > /machine > > > > > > > > > > > > > > > hvm > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > SandyBridge > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > destroy > > > > > restart > > > > > destroy > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > /opt/qemu/bin/qemu-system-x86_64 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >