From: Philipp Hahn <hahn@univention.de>
To: qemu-devel@nongnu.org
Cc: dann frazier <dann.frazier@canonical.com>,
Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCH] e1000: Don't set the Capabilities List bit
Date: Fri, 19 Oct 2012 13:02:43 +0200 [thread overview]
Message-ID: <201210191302.48620.hahn@univention.de> (raw)
In-Reply-To: <201210191159.29855.hahn@univention.de>
[-- Attachment #1.1: Type: text/plain, Size: 1074 bytes --]
Hello,
On Friday 19 October 2012 11:59:24 Philipp Hahn wrote:
> On Wednesday 21 September 2011 22:06:25 dann frazier wrote:
...
> > - /* TODO: we have no capabilities, so why is this bit set? */
> > - pci_set_word(pci_conf + PCI_STATUS, PCI_STATUS_CAP_LIST);
...
> Since cmask[PCI_STATUS=6] = PCI_STATUS_CAP_LIST=0x10 marks that bit as
> unmodifiable, the functions returns an error and aborts loading the saved
> state.
...
> 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 care
about the Capability List bit, perhaps the attached patch to ignore the bit
for e1000 would be in oder?
At least it fixes my problem.
Comments welcomed.
Sincerely
Philipp Hahn
--
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/
[-- Attachment #1.2: 0003-Bug-24702-e1000-pci-config.patch --]
[-- Type: text/x-diff, Size: 945 bytes --]
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 <hahn@univention.de>
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -1224,6 +1224,9 @@ static int pci_e1000_init(PCIDevice *pci_dev)
pci_conf = d->dev.config;
+ /* Ignore capability bit, which was set until qemu-0.15 */
+ d->dev.cmask[PCI_STATUS] &= ~PCI_STATUS_CAP_LIST;
+ d->dev.wmask[PCI_STATUS] &= ~PCI_STATUS_CAP_LIST;
/* TODO: RST# value should be 0, PCI spec 6.2.4 */
pci_conf[PCI_CACHE_LINE_SIZE] = 0x10;
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
prev parent reply other threads:[~2012-10-19 11:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-21 20:06 [Qemu-devel] [PATCH] e1000: Don't set the Capabilities List bit dann frazier
2011-09-23 16:06 ` Anthony Liguori
2012-10-19 9:59 ` Philipp Hahn
2012-10-19 11:02 ` Philipp Hahn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201210191302.48620.hahn@univention.de \
--to=hahn@univention.de \
--cc=anthony@codemonkey.ws \
--cc=dann.frazier@canonical.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).