From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFluR-0007Om-6q for qemu-devel@nongnu.org; Mon, 17 Oct 2011 08:03:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFluM-0002k0-Km for qemu-devel@nongnu.org; Mon, 17 Oct 2011 08:03:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFluM-0002jn-70 for qemu-devel@nongnu.org; Mon, 17 Oct 2011 08:03:06 -0400 Date: Mon, 17 Oct 2011 14:04:05 +0200 From: "Michael S. Tsirkin" Message-ID: <20111017120404.GG4537@redhat.com> References: <963bfdb7ee30cd65bec92c89cc04af0363de86c8.1318843693.git.jan.kiszka@siemens.com> <20111017114612.GE4537@redhat.com> <4E9C16A4.9030402@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E9C16A4.9030402@siemens.com> Subject: Re: [Qemu-devel] [RFC][PATCH 08/45] Introduce MSIMessage structure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Alex Williamson , Marcelo Tosatti , Avi Kivity , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" On Mon, Oct 17, 2011 at 01:51:00PM +0200, Jan Kiszka wrote: > On 2011-10-17 13:46, Michael S. Tsirkin wrote: > > On Mon, Oct 17, 2011 at 11:27:42AM +0200, Jan Kiszka wrote: > >> Will be used for generating and distributing MSI messages, both in > >> emulation mode and under KVM. > >> > >> Signed-off-by: Jan Kiszka > > > > I would add > > > > uint64_t msix_get_address(dev, vector) > > uint64_t msix_get_data(dev, vector) > > > > and same for msi. > > > > this would minimise the changes while still making it > > possible to avoid code duplication in kvm. > > I'm introducing msi[x]_message_from_vector for that purpose later on. Or > what do you mean? > > Jan It does not look like everyone actually wants the structure, users seem to put it on stack and then immediately unwrap it to get at the address/data. So two accessorts get_data + get_address instead of one, will remove the need to rework all code to use the structure. > -- > Siemens AG, Corporate Technology, CT T DE IT 1 > Corporate Competence Center Embedded Linux