From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH 12/15] piix_pci: introduce a write_config notifier Date: Sun, 5 Sep 2010 10:34:11 +0300 Message-ID: <20100905073411.GB16215@redhat.com> References: <1281622202-3453-12-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: Stefano Stabellini Cc: Blue Swirl , Anthony Perard , "xen-devel@lists.xensource.com" , "qemu-devel@nongnu.org" List-Id: xen-devel@lists.xenproject.org On Fri, Aug 13, 2010 at 02:10:01PM +0100, Stefano Stabellini wrote: > On Thu, 12 Aug 2010, Blue Swirl wrote: > > On Thu, Aug 12, 2010 at 2:09 PM, wrote: > > > From: Anthony PERARD > > > > > > Introduce a write config notifier in piix_pci, so that clients can be > > > notified every time a pci config write happens. > > > The patch also makes use of the notification mechanism in > > > xen_machine_fv. > > > > Will the mechanism be used elsewhere? If not, I'd just add a call to > > xen_piix_pci_write_config_client() to piix_pci.c. It can be surrounded > > by Xen #ifdeffery, or you could introduce stubs like kvm-stub.c and > > friends. > > > > we were trying to avoid ifdef's in piix_pci, but if you are OK with just a > couple of them we'll gladly remove the hook. > I second this. Callbacks complicate code significantly. If there's a single user we are better off without. -- MST