From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPALv-0001NS-Iw for qemu-devel@nongnu.org; Fri, 19 Oct 2012 07:02:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPALt-0002pl-4P for qemu-devel@nongnu.org; Fri, 19 Oct 2012 07:02:55 -0400 Received: from mail.univention.de ([82.198.197.8]:1278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPALs-0002of-R8 for qemu-devel@nongnu.org; Fri, 19 Oct 2012 07:02:53 -0400 From: Philipp Hahn Date: Fri, 19 Oct 2012 13:02:43 +0200 References: <1316635586-4586-1-git-send-email-dann.frazier@canonical.com> <201210191159.29855.hahn@univention.de> In-Reply-To: <201210191159.29855.hahn@univention.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2878730.xGDu3eacRo"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201210191302.48620.hahn@univention.de> Subject: Re: [Qemu-devel] [PATCH] e1000: Don't set the Capabilities List bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: dann frazier , Anthony Liguori --nextPart2878730.xGDu3eacRo Content-Type: multipart/mixed; boundary="Boundary-01=_TNTgQnfg2zTluKD" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_TNTgQnfg2zTluKD Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, On Friday 19 October 2012 11:59:24 Philipp Hahn wrote: > On Wednesday 21 September 2011 22:06:25 dann frazier wrote: =2E.. > > - /* TODO: we have no capabilities, so why is this bit set? */ > > - pci_set_word(pci_conf + PCI_STATUS, PCI_STATUS_CAP_LIST); =2E.. > Since cmask[PCI_STATUS=3D6] =3D PCI_STATUS_CAP_LIST=3D0x10 marks that bit= as > unmodifiable, the functions returns an error and aborts loading the saved > state. =2E.. > Has somebody an idea how to fix this issue? I'm no expert on PCI issues, but since e1000 drivers don't seem to much car= e=20 about the Capability List bit, perhaps the attached patch to ignore the bit= =20 for e1000 would be in oder? At least it fixes my problem. Comments welcomed. Sincerely Philipp Hahn =2D-=20 Philipp Hahn Open Source Software Engineer hahn@univention.de Univention GmbH be open. fon: +49 421 22 232- 0 Mary-Somerville-Str.1 D-28359 Bremen fax: +49 421 22 232-99 http://www.univention.de/ --Boundary-01=_TNTgQnfg2zTluKD Content-Type: text/x-diff; charset="iso-8859-15"; name="0003-Bug-24702-e1000-pci-config.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0003-Bug-24702-e1000-pci-config.patch" e1000: Ignore the Capabilities List bit dd8e93799f13ef82d83c185b8e71e049452f7d40 unconditionally removed the PCI_STATUS_CAP_LIST bit from PCI_STATUS, because the e1000 does not have capabilities. This breaks upgrades from before qemu-0.15, because there the= bit is still set and get_pci_config_device() refused to load incompatible save states. Remove the Capabilities List bit from the list of compatible bits, so it is= not validated for an exact match. Signed-off-by: Philipp Hahn =2D-- a/hw/e1000.c +++ b/hw/e1000.c @@ -1224,6 +1224,9 @@ static int pci_e1000_init(PCIDevice *pci_dev) =20 pci_conf =3D d->dev.config; =20 + /* Ignore capability bit, which was set until qemu-0.15 */ + d->dev.cmask[PCI_STATUS] &=3D ~PCI_STATUS_CAP_LIST; + d->dev.wmask[PCI_STATUS] &=3D ~PCI_STATUS_CAP_LIST; /* TODO: RST# value should be 0, PCI spec 6.2.4 */ pci_conf[PCI_CACHE_LINE_SIZE] =3D 0x10; =20 --Boundary-01=_TNTgQnfg2zTluKD-- --nextPart2878730.xGDu3eacRo Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAlCBM1QACgkQYPlgoZpUDjkY+wCfdz+zt74o0wTcJpGXwTyibYYx P0EAmwRlHYpNobMGVGhlqZ1SbiM65F++ =0ucq -----END PGP SIGNATURE----- --nextPart2878730.xGDu3eacRo--