From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XH2Pi-0001Kb-AW for qemu-devel@nongnu.org; Mon, 11 Aug 2014 23:06:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XH2Pe-00037F-A9 for qemu-devel@nongnu.org; Mon, 11 Aug 2014 23:06:18 -0400 Received: from ozlabs.org ([103.22.144.67]:48827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XH2Pd-00036w-WB for qemu-devel@nongnu.org; Mon, 11 Aug 2014 23:06:14 -0400 Date: Tue, 12 Aug 2014 12:41:47 +1000 From: David Gibson Message-ID: <20140812024147.GD23065@voom.redhat.com> References: <1407594349-9291-1-git-send-email-eric.auger@linaro.org> <1407594349-9291-6-git-send-email-eric.auger@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fOHHtNG4YXGJ0yqR" Content-Disposition: inline In-Reply-To: <1407594349-9291-6-git-send-email-eric.auger@linaro.org> Subject: Re: [Qemu-devel] [PATCH v5 05/10] hw/vfio/pci: split vfio_get_device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Auger Cc: peter.maydell@linaro.org, kim.phillips@freescale.com, eric.auger@st.com, patches@linaro.org, joel.schopp@amd.com, will.deacon@arm.com, qemu-devel@nongnu.org, a.rigo@virtualopensystems.com, Bharat.Bhushan@freescale.com, agraf@suse.de, alex.williamson@redhat.com, stuart.yoder@freescale.com, a.motakis@virtualopensystems.com, kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org --fOHHtNG4YXGJ0yqR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 09, 2014 at 03:25:44PM +0100, Eric Auger wrote: > vfio_get_device now takes a VFIODevice as argument. The function is split > into 4 functional parts: dev_info query, device check, region populate > and interrupt populate. the last 3 are specialized by parent device and > are added into DeviceOps. Why is splitting these up into 4 stages useful, rather than having a single sub-class specific callback? --=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 --fOHHtNG4YXGJ0yqR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJT6X7rAAoJEGw4ysog2bOSpeoQAJ3N1A3MBj3leqvYBu/ksYhs A2Cs7PUv0Wtrbr+8izuqC6dgQc2cy9xc0P/gzY8CfVIjWJfKlXgg1nHS0e5Tz/tq IKbRxCksppXj7dWQ3VqOIe9rzK2huGIHdMmJy1/yNVpbexxjgYVpxKklqeAOYE0c pGfJkHMj9i63nIE/1XRtaCSE+hrdLRQo9lfCYYnv4rS4WfJv/BaVkoDbPVSPdHko LvvWVjJocFg+oSuQyHcmciAGfTAI03nH/V9w+zaTi4sidrTR1mwLpqvX2iQrCzqJ 91N6t4oHyV7EhvK0Jg7Lnbe4Ha6udW3P406gW6tLGKlmHAFKm0cwyARW6bjtr84o 4q7/Z9UW0rMBTRIllQrzqhMRLVSXfmXNUQGENMx/evbyd0inPYJJi2DlHlFM0C8u wrOTpb3aCEpRIP3ePzTi53zVYlZnWOVx0YDtsmZEN+6Wfm7RMnF8vxAeyOpVH8DV z+F+ApV4m/7+Z6Wk5UR9nw59nq/lUVqy13YXImJh6wIq4R4C1tPqNA0LR8+p6yZc KJebe7a3nmfghpdwi8lSY19+O0xZ1I9jVjKzcXrVPAuy/TpjvOx2GIlXPlrAuONW khgCouKPvEAwbgY6OGdjSqlQBtdSlYqLLkAcbmhIc/sZKM9JpFSZfqLMRWs3s296 xjxb45zoUzl/oqKYTdlP =Szqw -----END PGP SIGNATURE----- --fOHHtNG4YXGJ0yqR--