From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 3/4] Support for device capability Date: Tue, 25 Nov 2008 16:39:34 +0200 Message-ID: <492C0E26.2080100@redhat.com> References: <1227258267-22901-1-git-send-email-sheng@linux.intel.com> <1227258267-22901-4-git-send-email-sheng@linux.intel.com> <49294C65.7070404@redhat.com> <200811241524.15530.sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , kvm@vger.kernel.org To: Sheng Yang Return-path: Received: from mx2.redhat.com ([66.187.237.31]:50617 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750890AbYKYOjs (ORCPT ); Tue, 25 Nov 2008 09:39:48 -0500 In-Reply-To: <200811241524.15530.sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Sheng Yang wrote: > On Sunday 23 November 2008 20:28:21 Avi Kivity wrote: > >> Sheng Yang wrote: >> >>> This framework can be easily extended to support device capability, like >>> MSI/MSI-x. >>> >> At least some of this should go into pci.c, so non-assigned devices can >> benefit. >> > > So you means a capability configuration space for native QEmu? Yeah, that's > reasonable if we can emulate them. :) > Sure, msi injection should be easy both for the qemu apic and with the kvm apic. >>> static void assigned_dev_pci_write_config(PCIDevice *d, uint32_t >>> address, uint32_t val, int len) { >>> int fd; >>> ssize_t ret; >>> + AssignedDevice *pci_dev = (AssignedDevice *)d; >>> >> container_of() >> > > Oops, I just think QEmu don't have this macro... > qemu/osdep.h. -- error compiling committee.c: too many arguments to function