From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH v2 8/9] qemu-kvm: Refresh MSI settings after vmload Date: Wed, 27 Apr 2011 16:39:53 +0200 Message-ID: <4DB82AB9.4090500@siemens.com> References: <4DB7E315.6030004@redhat.com> <4DB80059.7080308@siemens.com> <20110427141631.GO15788@redhat.com> <4DB82828.7040800@siemens.com> <20110427143049.GQ15788@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , "kvm@vger.kernel.org" To: "Michael S. Tsirkin" Return-path: Received: from david.siemens.de ([192.35.17.14]:28199 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750988Ab1D0Oj5 (ORCPT ); Wed, 27 Apr 2011 10:39:57 -0400 In-Reply-To: <20110427143049.GQ15788@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 2011-04-27 16:30, Michael S. Tsirkin wrote: >>>> --- a/hw/pci.c >>>> +++ b/hw/pci.c >>>> @@ -34,6 +34,7 @@ >>>> #include "device-assignment.h" >>>> #include "qemu-objects.h" >>>> #include "range.h" >>>> +#include "msi.h" >>>> >>>> //#define DEBUG_PCI >>>> #ifdef DEBUG_PCI >>>> @@ -342,6 +343,7 @@ static int get_pci_config_device(QEMUFile *f, void *pv, size_t size) >>>> memcpy(s->config, config, size); >>>> >>>> pci_update_mappings(s); >>>> + msi_post_load(s); >>> >>> Pls don't do this: I'm trying to keep just the core in >>> pci.c and all capabilities in separate files. >>> msix has msix_load, msi will just need one too, >>> and let all devices call that. >>> >> >> Preferred alternatives are...? Registering a vmstate for msi? >> >> Jan > > Add msi_load and call that from devices that need it. > Like msix_load does now. > msix_load/save are refactoring candidates IMHO. MSI-X has a real need for storing additional state information, so it should register its own subsection. I don't want to offload this burden to the devices also for MSI. From the devices' POV, why shouldn't msi_init suffice? Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux