From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhJzh-0001sS-Fn for qemu-devel@nongnu.org; Tue, 06 Sep 2016 13:17:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhJzW-0007XW-5U for qemu-devel@nongnu.org; Tue, 06 Sep 2016 13:17:07 -0400 Received: from mail-qk0-x243.google.com ([2607:f8b0:400d:c09::243]:34303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhJzW-0007XS-0W for qemu-devel@nongnu.org; Tue, 06 Sep 2016 13:16:58 -0400 Received: by mail-qk0-x243.google.com with SMTP id r128so14986300qkc.1 for ; Tue, 06 Sep 2016 10:16:57 -0700 (PDT) Date: Tue, 6 Sep 2016 13:16:53 -0400 From: Stefan Hajnoczi Message-ID: <20160906171653.GA12628@stefanha-x1.localdomain> References: <1466345649-64841-1-git-send-email-wei.w.wang@intel.com> <286AC319A985734F985F78AFA26841F7CB5968@shsmsx102.ccr.corp.intel.com> <20160829152451.GB18909@stefanha-x1.localdomain> <286AC319A985734F985F78AFA26841F736B2AC8E@shsmsx102.ccr.corp.intel.com> <20160831160758.GC18281@stefanha-x1.localdomain> <57C856ED.60808@intel.com> <20160902132632.GA21771@stefanha-x1.localdomain> <286AC319A985734F985F78AFA26841F736B33BCB@shsmsx102.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [virtio-comment] [PATCH] *** Vhost-pci RFC v2 *** List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Marc-Andr=E9?= Lureau Cc: "Wang, Wei W" , Stefan Hajnoczi , "pbonzini@redhat.com" , "mst@redhat.com" , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , "virtio-comment@lists.oasis-open.org" --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 05, 2016 at 08:56:14AM +0000, Marc-Andr=E9 Lureau wrote: > Hi >=20 > On Sat, Sep 3, 2016 at 5:36 PM Wang, Wei W wrote: >=20 > > Marc-Andr=E9 and I just got different thoughts about a design direction= =2E I > > prefer to have all the frontend virtio devices (net, scsi, console etc.) > > from the same VM to be supported by one backend vhost-pci device (N-1), > > while Marc-Andr=E9 prefers to have each frontend virtio device be suppo= rted > > by a backend vhost-pci device (N-N). > > >=20 > I suggested 1-1 (not n-n, but you can have several 1-1 pairs), unless you > have a good reason to do differently, starting from the use case (is there > a case that requires several backends/consumers in the same VM? if yes, 1= -1 > design could still fit). If it's to save guest memory space, it may not be > a good enough reason, but I don't see clearly the implications. N-1 saves address space but is probably a poor fit for modern PCI devices that are geared towards IOMMUs. Each virtio device should be isolated in terms of memory space and hotplug/reset life cycle. This ensures they are robust against driver bugs and can be safely delegated/passed through to different applications or nested VMs that don't trust each other. Isolation between virtio device instances sharing a single vhost-pci device (N-1) will harder to achieve. I would aim for the simpler 1-1 design instead where each device is isolated. Are there specific reasons for wanting an N-1 design? Stefan --45Z9DzgjV8m4Oswq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJXzvoFAAoJEJykq7OBq3PIyRYIAI45/1vdy7yaFVn0TwFP+eri wYsCQJNKiWm5BDMZtEq1ngcQWM4beECddobh7A1J56z731WVDMh9mzq3FF54izhg ebWfhZKGsScTWzAfqsk/nUIXWk4dupoCBr3k1uKRaZUNrJW5BJ46Zli40kfePtCv ky8Fk6GZRUS5ilXsmW+wqR71pBVEM5Otzg5kYZFX3gExBy3Z6/ucok50/gJXqO9l veWf/kXqRo1oRqCvXr0njsBCihNx5ITpKO/PQXokWRQ78UrK+xPIBAX6sxYYKMvs ZkhSRuj+2+ci7x9omCa6iXuFDmK1ONhx0idTRYreOls27EfeFmRjRlEiyqHpAy4= =3079 -----END PGP SIGNATURE----- --45Z9DzgjV8m4Oswq--