New issue
Advanced search Search tips

Issue 888821 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

PCI bar 0 is reset when pci_configration is read

Project Member Reported by jkwang@google.com, Sep 25

Issue description

For xhci controller.
lspci -> 
00:04.0 Class 0c03: Device 1b73:1000 (prog-if 30)
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 64, Cache Line Size: 64 bytes
	Interrupt: pin D routed to IRQ 8
	Region 0: Memory at e0000000 (32-bit, non-prefetchable)

e0000000 should be e000c000.

Need more investigation. Filing this bug to track this issue.

 
Could you please try rebasing on the updated PCI patch set from Gerrit?  https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1240659

It would also be interesting to see the kernel dmesg output (dmesg | grep -i pci); you should see some messages about where the kernel maps each BAR, something like this:

[    0.639310] pci 0000:00:01.0: [1af4:1042] type 00 class 0xffff00
[    0.639964] pci 0000:00:01.0: reg 0x10: [mem 0xe0000000-0xe0003fff]
[    0.643597] pci 0000:00:02.0: [1af4:1042] type 00 class 0xffff00
[    0.644272] pci 0000:00:02.0: reg 0x10: [mem 0xe0004000-0xe0007fff]
[    0.647843] pci 0000:00:03.0: [1af4:1044] type 00 class 0xffff00                                           
[    0.648488] pci 0000:00:03.0: reg 0x10: [mem 0xe0008000-0xe000bfff]
[    0.652094] pci 0000:00:04.0: [1af4:1045] type 00 class 0xffff00
[    0.652742] pci 0000:00:04.0: reg 0x10: [mem 0xe000c000-0xe000ffff]

Dmesg before cherry pick
[    0.422517] pci 0000:00:01.0: [1af4:1044] type 00 class 0xffff00
[    0.423287] pci 0000:00:01.0: reg 0x10: [mem 0xe0000000-0xe0003fff]
[    0.424505] pci 0000:00:01.0: reg 0x30: [mem 0x00000000-0x000007ff pref]
[    0.427194] pci 0000:00:02.0: [1af4:1045] type 00 class 0xffff00
[    0.427917] pci 0000:00:02.0: reg 0x10: [mem 0xe0004000-0xe0007fff]
[    0.429126] pci 0000:00:02.0: reg 0x30: [mem 0x00000000-0x000007ff pref]
[    0.431832] pci 0000:00:03.0: [1af4:1042] type 00 class 0xffff00
[    0.432583] pci 0000:00:03.0: reg 0x10: [mem 0xe0008000-0xe000bfff]
[    0.433808] pci 0000:00:03.0: reg 0x30: [mem 0x00000000-0x000007ff pref]
[    0.436208] pci 0000:00:04.0: [1b73:1000] type 00 class 0x0c0330
[    0.437057] pci 0000:00:04.0: reg 0x10: [mem 0xe000c000-0xe001bfff]
[    0.439660] pci 0000:00:04.0: reg 0x30: [mem 0x00000000-0x000007ff pref]


Getting a kernel panic after cherry-pick.


[    0.616883] sched_clock: Marking stable (616632775, 0)->(903901580, -287268805)
[    0.618626] Btrfs loaded, crc32c=crc32c-generic
[    0.620690] Key type encrypted registered
[    0.621952]   Magic number: 2:289:446
[    0.623087] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    0.624638] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.70-07544-g78ff58b31e48-dirty #8
[    0.626162] Call Trace:
[    0.626666]  dump_stack+0x5a/0x6f
[    0.627358]  panic+0xd1/0x223
[    0.627945]  ? printk+0x3e/0x46
[    0.628560]  mount_block_root+0x270/0x287
[    0.629310]  prepare_namespace+0x131/0x167
[    0.630058]  kernel_init_freeable+0x1fb/0x209
[    0.630869]  ? rest_init+0xb3/0xb3
[    0.631503]  kernel_init+0x5/0xee
[    0.632125]  ret_from_fork+0x35/0x40
[    0.632813] Kernel Offset: disabled
[    0.633457] Rebooting in 1 seconds..



Is this with the full PCI patch series, including the final patch that converts all of the virtio devs to PCI, or are the virtio devices still MMIO?
With all. I cherry-picked the implementation from your github last week and re based xhci on it. 

Will test with the review chain later.
Labels: Proj-Containers
Status: Assigned (was: Untriaged)
<triage>Assigning to owner</triage>
Is this bug still relevant? I think it was probably resolved, since the current USB patch set is working.

Sign in to add a comment