All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: xen-devel@lists.xensource.com, keir.fraser@eu.citrix.com,
	Ian.Jackson@eu.citrix.com, Ian.Campbell@citrix.com
Cc: konrad.wilk@oracle.com
Subject: [PATCH 4 of 6] xend: Don't crash due to weird PCI devices
Date: Sat, 24 Mar 2012 13:41:45 -0400	[thread overview]
Message-ID: <d42921da3931026ecf5d.1332610905@phenom.dumpdata.com> (raw)
In-Reply-To: <patchbomb.1332610901@phenom.dumpdata.com>

# HG changeset patch
# User Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
# Date 1332610898 14400
# Node ID d42921da3931026ecf5da7c0e5bb86074e77cf71
# Parent  75798a472b1a9121adda166b6fd05ba8473a44f0
xend: Don't crash due to weird PCI devices

This fixes Red Hat BZ 767742 where a user had some truly
weird PCI devices:

$ lspci -vvv -xxx -s 0000:01:00.0
01:00.0 VGA compatible controller: nVidia Corporation GT218 [NVS 3100M] (rev
ff) (prog-if ff)
 !!! Unknown header type 7f
00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

And xend would report:

ERROR (pci:1272) Caught 'Looped capability chain: 0000:01:00.0'

This fixes it.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

diff -r 75798a472b1a -r d42921da3931 tools/python/xen/util/pci.py
--- a/tools/python/xen/util/pci.py	Sat Mar 24 13:41:38 2012 -0400
+++ b/tools/python/xen/util/pci.py	Sat Mar 24 13:41:38 2012 -0400
@@ -1268,7 +1268,12 @@ class PciDevice:
             pass
 
     def get_info_from_sysfs(self):
-        self.find_capability(0x11)
+        try:
+            self.find_capability(0x11)
+        except PciDeviceParseError, err:
+            log.error("Caught '%s'" % err)
+            return False
+
         sysfs_mnt = find_sysfs_mnt()
         if sysfs_mnt == None:
             return False

  parent reply	other threads:[~2012-03-24 17:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-24 17:41 [PATCH 0 of 6] Various patches - debug help, xend fixes and S3 resume fixes (v1) Konrad Rzeszutek Wilk
2012-03-24 17:41 ` [PATCH 1 of 6] linux-xencommons: Load xen-acpi-processor Konrad Rzeszutek Wilk
2012-03-27 13:39   ` Ian Jackson
2012-03-24 17:41 ` [PATCH 2 of 6] xen/vga: Add 'vga_delay' parameter to delay screen output by 2 second per screen output Konrad Rzeszutek Wilk
2012-03-26  8:43   ` Jan Beulich
2012-03-27 13:41   ` Ian Jackson
2012-03-24 17:41 ` [PATCH 3 of 6] xen/pat: After suspend re-write PAT if BIOS changed it Konrad Rzeszutek Wilk
2012-03-26  8:50   ` Jan Beulich
2012-04-02 15:28     ` Konrad Rzeszutek Wilk
2012-04-03 13:03       ` Tom Goetz
2012-03-24 17:41 ` Konrad Rzeszutek Wilk [this message]
2012-03-27 13:39   ` [PATCH 4 of 6] xend: Don't crash due to weird PCI devices Ian Jackson
2012-03-24 17:41 ` [PATCH 5 of 6] xend/xc: Implement a domain_set_e820_hole function to be used by python code Konrad Rzeszutek Wilk
2012-03-26  9:42   ` Ian Campbell
2012-04-02 15:59     ` Konrad Rzeszutek Wilk
2012-04-02 16:02       ` Ian Campbell
2012-03-24 17:41 ` [PATCH 6 of 6] xend: Add support for passing in the host's E820 for PCI passthrough Konrad Rzeszutek Wilk
2012-03-27 13:43   ` Ian Jackson
2012-04-02 16:00     ` Konrad Rzeszutek Wilk

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=d42921da3931026ecf5d.1332610905@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.