From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7TNh-0000Xo-6L for qemu-devel@nongnu.org; Fri, 31 Aug 2012 11:43:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T7TNd-0002uw-1x for qemu-devel@nongnu.org; Fri, 31 Aug 2012 11:43:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7TNc-0002us-Om for qemu-devel@nongnu.org; Fri, 31 Aug 2012 11:43:32 -0400 Date: Fri, 31 Aug 2012 11:43:31 -0400 From: Jason Baron Message-ID: <20120831154331.GE12212@redhat.com> References: <20120831084227.GA24072@redhat.com> <20120831144551.GB12212@redhat.com> <20120831153513.GB24891@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120831153513.GB24891@redhat.com> Subject: Re: [Qemu-devel] [PATCH 2/2] pcie_aer: clear cmask for Advanced Error Interrupt Message Number List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: yamahata@valinux.co.jp, alex.williamson@redhat.com, quintela@redhat.com, qemu-devel@nongnu.org, jan.kiszka@siemens.com On Fri, Aug 31, 2012 at 06:35:13PM +0300, Michael S. Tsirkin wrote: > On Fri, Aug 31, 2012 at 10:45:52AM -0400, Jason Baron wrote: > > On Fri, Aug 31, 2012 at 11:42:27AM +0300, Michael S. Tsirkin wrote: > > > Some minor nits below. If you dont get to it I will tweak this patch > > > when I apply it early next week. > > > > > > On Thu, Aug 30, 2012 at 01:51:15PM -0400, Jason Baron wrote: > > > > The Advanced Error Interrupt Message Number (bits 31:27 of the Root > > > > Error Status Register) is updated when the number of msi messages assigned to a > > > > device changes. Migration of windows 7 on q35 chipset failed because the check > > > > in get_pci_config_device() fails due to wmask being set on these bits. > > > > > > I think you actually mean 'not being set on these bits'? > > > > > > > No, the check is: > > > > static int get_pci_config_device(QEMUFile *f, void *pv, size_t size) > > { > > PCIDevice *s = container_of(pv, PCIDevice, config); > > uint8_t *config; > > int i; > > > > assert(size == pci_config_size(s)); > > config = g_malloc(size); > > > > qemu_get_buffer(f, config, size); > > for (i = 0; i < size; ++i) { > > if ((config[i] ^ s->config[i]) & > > s->cmask[i] & ~s->wmask[i] & ~s->w1cmask[i]) { > > g_free(config); > > return -EINVAL; > > } > > } > > ..... > > > > So because cmask is set and these bits differ in config space (due to > > them being updated before migration), the migration aborts. > > Ah so you mean 'cmask being set' - not wmask as you wrote. > Sorry - my mistake, yes I meant 'cmask'. I will fix the changelog in the re-post. Thanks, -Jason