Bug 982868 - guest kernel panic when upstream assigned pci address except "addr=0x0"
guest kernel panic when upstream assigned pci address except "addr=0x0"
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
x86_64 Linux
low Severity low
: rc
: ---
Assigned To: Alex Williamson
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-09 23:47 EDT by zhonglinzhang
Modified: 2013-07-10 15:20 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-10 15:20:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description zhonglinzhang 2013-07-09 23:47:59 EDT
Description of problem:
the cli upsteram assigned pci address except "addr=0x0", boot up the guest cause guest kernel panic. 
e.g -device x3130-upstream,bus=root.0,addr=0x4,id=upstream

Version-Release number of selected component (if applicable):
host and guest kernel:
3.10.0-0.rc7.64.el7.x86_64
qemu-kvm version:
qemu-img-1.5.1-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. boot up guest with cli as follow:
/usr/libexec/qemu-kvm -M q35 -device ioh3420,bus=pcie.0,id=root.0 -device x3130-upstream,bus=root.0,addr=0x4,id=upstream -device xio3130-downstream,bus=upstream,id=downstream0,chassis=1 -drive file=/home/rhel7_switch.qcow,if=none,id=drive-system-disk,media=disk,format=qcow2,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,bus=downstream0,drive=drive-system-disk,id=system-disk,bootindex=1 -monitor stdio -vnc :2

2. 
3.

Actual results:
kernel panic when boot up guest.
[    0.070111] BUG: unable to handle kernel NULL pointer dereference at 0000000000000038
[    0.071000] IP: [<ffffffff81321f4d>] pcie_aspm_init_link_state+0x6fd/0x7d0
[    0.071000] PGD 0 
[    0.071000] Oops: 0000 [#1] SMP 
[    0.071000] Modules linked in:
[    0.071000] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0-0.rc7.64.el7.x86_64 #1
[    0.071000] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[    0.071000] task: ffff880006568000 ti: ffff880006566000 task.ti: ffff880006566000
[    0.071000] RIP: 0010:[<ffffffff81321f4d>]  [<ffffffff81321f4d>] pcie_aspm_init_link_state+0x6fd/0x7d0
[    0.071000] RSP: 0000:ffff880006567c38  EFLAGS: 00010246
[    0.071000] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
[    0.071000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88000677d578
[    0.071000] RBP: ffff880006567c90 R08: 00000000000173c0 R09: ffff880006401800
[    0.071000] R10: ffffffff81321989 R11: 0000000000000000 R12: ffff88000677d540
[    0.071000] R13: ffff880006765000 R14: ffff88000677d558 R15: ffff88000676f400
[    0.071000] FS:  0000000000000000(0000) GS:ffff880007c00000(0000) knlGS:0000000000000000
[    0.071000] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[    0.071000] CR2: 0000000000000038 CR3: 00000000018f8000 CR4: 00000000000006f0
[    0.071000] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    0.071000] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[    0.071000] Stack:
[    0.071000]  ffff880006567c60 ffffffff81310162 ffff880006766000 ffff88000676fc00
[    0.071000]  0000000000000000 ffff880006567c90 0000000000000000 ffff88000676fc00
[    0.071000]  0000000000000001 0000000000000000 ffff88000676f400 ffff880006567cc0
[    0.071000] Call Trace:
[    0.071000]  [<ffffffff81310162>] ? pci_setup_device+0xb2/0x440
[    0.071000]  [<ffffffff8131074d>] pci_scan_slot+0x10d/0x150
[    0.071000]  [<ffffffff8131149d>] pci_scan_child_bus+0x3d/0x150
[    0.071000]  [<ffffffff8131129b>] pci_scan_bridge+0x46b/0x630
[    0.071000]  [<ffffffff815e4e24>] ? pci_scan_single_device+0x54/0xc0
[    0.071000]  [<ffffffff81311516>] pci_scan_child_bus+0xb6/0x150
[    0.071000]  [<ffffffff813117b0>] pci_scan_root_bus+0xa0/0xb0
[    0.071000]  [<ffffffff814dae8c>] pci_scan_bus_on_node+0x7c/0xd0
[    0.071000]  [<ffffffff814d97f7>] pcibios_scan_specific_bus+0x97/0xa0
[    0.071000]  [<ffffffff81a78d09>] ? pci_legacy_init+0x37/0x37
[    0.071000]  [<ffffffff81a78d3f>] pci_subsys_init+0x36/0x48
[    0.071000]  [<ffffffff810020e2>] do_one_initcall+0xe2/0x190
[    0.071000]  [<ffffffff81a27076>] kernel_init_freeable+0x181/0x207
[    0.071000]  [<ffffffff81a26881>] ? do_early_param+0x88/0x88
[    0.071000]  [<ffffffff815e1960>] ? rest_init+0x80/0x80
[    0.071000]  [<ffffffff815e196e>] kernel_init+0xe/0x180
[    0.071000]  [<ffffffff8160ccac>] ret_from_fork+0x7c/0xb0
[    0.071000]  [<ffffffff815e1960>] ? rest_init+0x80/0x80
[    0.071000] Code: ff ff ff 41 80 4c 24 49 70 48 8b 45 b0 4c 8b 68 28 4d 39 f5 0f 85 51 ff ff ff 4d 8b 2c 24 e9 eb fa ff ff 49 8b 45 10 48 8b 40 10 <48> 8b 40 38 48 8b 80 88 00 00 00 48 85 c0 0f 84 af 00 00 00 49 
[    0.071000] RIP  [<ffffffff81321f4d>] pcie_aspm_init_link_state+0x6fd/0x7d0
[    0.071000]  RSP <ffff880006567c38>
[    0.071000] CR2: 0000000000000038
[    0.071016] ---[ end trace a653fd7b9c64fe99 ]---
[    0.072002] Kernel panic - not syncing: Fatal exception

Expected results:
guest should boot up successful.

Additional info: 
upstream assigned without "addr=0x4", or with "addr=0x0" can boot up successful.

Note You need to log in before you can comment on or make changes to this bug.