From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751561AbcHLGwD (ORCPT ); Fri, 12 Aug 2016 02:52:03 -0400 Received: from ozlabs.org ([103.22.144.67]:37619 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750989AbcHLGwB (ORCPT ); Fri, 12 Aug 2016 02:52:01 -0400 Date: Fri, 12 Aug 2016 16:46:31 +1000 From: David Gibson To: Cornelia Huck Cc: Paolo Bonzini , Paul Mackerras , Alexander Graf , alex.williamson@redhat.com, aik@ozlabs.ru, mdroth@linux.vnet.ibm.com, benh@kernel.crashing.org, mpe@ellerman.id.au, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kvm-ppc Subject: Re: [PATCH] vfio: Enable VFIO device for powerpc Message-ID: <20160812064631.GW16493@voom.fritz.box> References: <1439428546-13416-1-git-send-email-david@gibson.dropbear.id.au> <55DD8822.4060409@suse.de> <20150826185442.GB2662@fergus.ozlabs.ibm.com> <20160811151957.0f113a7c.cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lQcP9vuZCkvmDKre" Content-Disposition: inline In-Reply-To: <20160811151957.0f113a7c.cornelia.huck@de.ibm.com> User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --lQcP9vuZCkvmDKre Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 11, 2016 at 03:19:57PM +0200, Cornelia Huck wrote: > On Thu, 11 Aug 2016 14:57:24 +0200 > Paolo Bonzini wrote: >=20 > > On 26/08/2015 20:54, Paul Mackerras wrote: > > > On Wed, Aug 26, 2015 at 11:34:26AM +0200, Alexander Graf wrote: > > >> On 13.08.15 03:15, David Gibson wrote: > > >>> ec53500f "kvm: Add VFIO device" added a special KVM pseudo-device w= hich is > > >>> used to handle any necessary interactions between KVM and VFIO. > > >>> > > >>> Currently that device is built on x86 and ARM, but not powerpc, alt= hough > > >>> powerpc does support both KVM and VFIO. This makes things awkward = in > > >>> userspace > > >>> > > >>> Currently qemu prints an alarming error message if you attempt to u= se VFIO > > >>> and it can't initialize the KVM VFIO device. We don't want to remo= ve the > > >>> warning, because lack of the KVM VFIO device could mean coherency p= roblems > > >>> on x86. On powerpc, however, the error is harmless but looks distu= rbing, > > >>> and a test based on host architecture in qemu would be ugly, and br= eak if > > >>> we do need the KVM VFIO device for something important in future. > > >>> > > >>> There's nothing preventing the KVM VFIO device from being built for > > >>> powerpc, so this patch turns it on. It won't actually do anything,= since > > >>> we don't define any of the arch_*() hooks, but it will make qemu ha= ppy and > > >>> we can extend it in future if we need to. > > >>> > > >>> Signed-off-by: David Gibson > > >>> Reviewed-by: Eric Auger > >=20 > > This patch (commit 178a787502123) did not select CONFIG_KVM_VFIO, so the > > patch did nothing---except causing build failures which I fixed in > > commit 0af574be32cdd ("KVM: PPC: do not compile in vfio.o > > unconditionally", 2016-03-21) by making the patch a total no-op. > >=20 > > Is KVM_VFIO really needed, and if so can this patch be fixed? >=20 > FWIW, we enabled building vfio.o on s390 in 14b0b4a ("KVM: s390: Enable > the KVM-VFIO device") with the rationale "while we don't need it, be > like everybody else". >=20 > Should powerpc (and every other architecture supporting kvm and vfio) > select KVM_VFIO so that really everybody does the same thing? Yes, I think it should. That was my intention when I sent that patch - I just messed it up. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --lQcP9vuZCkvmDKre Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXrXDHAAoJEGw4ysog2bOSuaIQAK4QkWkgjVxNtM7wnlwTuwGp RiBqQmBPMqNEBNif4y7Rz2FBhPJTiqV8iUmHcr6I+7SOqcIKTqqnAuN5AoEXv981 4xkgdrBj0eZYvxC+bGHaOwGhxTEALG5wkQHc7047SaeOYe9NOH8w1gs3fckSKFuu 4D45RTJ3NbIE9SY916lVPARGJd7dGgemfri0HD5QAt/7E2LMw2oZ8DuVNOl73tiY 6GtNBWq7cTtGOzCg4UY/YNrDPIJE0Qn+HfxX8yI8QO7mPcxoadE8zhSbqITK+K/z s6URtChxZQCAmLHN+KbSs2es8an89+cY8zJJUMlhbxJ9epMDixeUhfYXViRThmAN gs+gsYgsDGusw5LtF1lqNrOW5Ll9W8bRfw3hpeyOsUgVqWnIV5KVyWpy+Xkj8UcS LVm7ksZrK83FoFSby7iZ8O+r6oahZD3mt4WdKYDZyvREVHYwb8JnCdd7SvKkDlX4 phcAhyxxkSQvMlSxWWNbu4ZYcEKQBhhskRm2ti/gZiZZUct7tWeX+Wyk8Lh7ksFy ISUIAuxQjoB80/BdjeaD0JRsLwgT2sKXJWG4bN7FgxwnVEcCmwEMJtnUdsbbFSno HpnPNJkWNFiDJMnk1LsthwN0mxkXP2kRW3Q0kB5a4WiYh7Ph7CvsMkz0mybXZcjm VvAJLeQDtkjGxSTWM3Iq =EHs/ -----END PGP SIGNATURE----- --lQcP9vuZCkvmDKre--