From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6aR4-00026a-Dh for qemu-devel@nongnu.org; Sun, 21 Jun 2015 04:17:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z6aR0-0003g0-99 for qemu-devel@nongnu.org; Sun, 21 Jun 2015 04:17:02 -0400 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:37421) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6aR0-0003fq-22 for qemu-devel@nongnu.org; Sun, 21 Jun 2015 04:16:58 -0400 Received: by wicgi11 with SMTP id gi11so50007564wic.0 for ; Sun, 21 Jun 2015 01:16:56 -0700 (PDT) Message-ID: <558672F2.3040204@gmail.com> Date: Sun, 21 Jun 2015 11:16:50 +0300 From: Marcel Apfelbaum MIME-Version: 1.0 References: <1434443079-25755-1-git-send-email-shmulik.ladkani@ravellosystems.com> <55813F8E.1000105@gmail.com> <20150617214649.7740e8b9@pixies> In-Reply-To: <20150617214649.7740e8b9@pixies> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1] pci: Don't register a specialized 'config_write' if default behavior is intended Reply-To: marcel@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Shmulik Ladkani Cc: Leonid Shatz , Hannes Reinecke , Idan Brown , qemu-devel@nongnu.org, "Michael S. Tsirkin" On 06/17/2015 09:46 PM, Shmulik Ladkani wrote: > Hi, > > On Wed, 17 Jun 2015 12:36:14 +0300, marcel.apfelbaum@gmail.com wrote: >>> NOTE: >>> Not sure if my statement regarding ommitting 'config_write' holds >>> for the megasas case: >>> It's parent is TYPE_MEGASAS_BASE whose parent is TYPE_PCI_DEVICE. >>> Can we assume 'config_write' will be set to >>> 'pci_default_write_config' in this case? >> No need to assume here, you can simply add a trace and check. >> However, the do_pci_register_device method assigns config_write method >> to PCIDevice *instances* using the class method or the default >> pci_default_write_config. >> >> Since TYPE_MEGASAS_BASE does not define a config_write method, the >> field will remain NULL. Anyway, you are welcomed to run it and >> double-check. > > Verified; do_pci_register_device indeed sets it to pci_default_write_config. > > Thanks, > Shmulik > Cool! Thanks, Marcel