Linux

試圖將 NIC 傳遞給 domU 會導致核心崩潰

  • July 4, 2010

我在 dom0 和 domU 上都使用 CentOS 5.5 x64。我正在嘗試使用 pciback 將 3 埠 NIC(Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet (rev 10))傳遞到 domU。但是,當 NIC 上的第一個埠聯機時,會導致 domU 崩潰。有什麼建議?(eth0 是板載網卡,工作正常)。

編輯:順便說一句,將“swiotlb=force”添加到 domU 核心行(如轉儲中的建議)會導致 domU 失敗並出現相同的錯誤,只有在啟動 vm 時才會立即發生。

Bringing up interface eth0:  
Determining IP information for eth0... done.    [  OK  ]
Bringing up interface eth1:  
Determining IP information for eth1...Fatal DMA error! Please use 'swiotlb=force'
----------- [cut here ] --------- [please bite here ] ---------
Kernel BUG at arch/x86_64/kernel/../../i386/kernel/pci-dma-xen.c:394
invalid opcode: 0000 [1] SMP 
last sysfs file: /class/net/eth1/address
CPU 0 
Modules linked in: be2iscsi ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp bnx2i cnic ipv6 xfrm_nalgo crypto_api uio cxgb3i cxgb3 8021q libiscsi_tcp libiscsi2 scsi_transport_iscsi2 scsi_transport_iscsi loop dm_mirror dm_multipath scsi_dh scsi_mod parport_pc lp parport r8169 mii pcspkr xennet dm_raid45 dm_message dm_region_hash dm_log dm_mod dm_mem_cache xenblk ext3 jbd uhci_hcd ohci_hcd ehci_hcd
Pid: 1359, comm: ip Not tainted 2.6.18-194.el5xen #1
RIP: e030:[<ffffffff802723ff>]  [<ffffffff802723ff>] dma_map_single+0x12d/0x17d
RSP: e02b:ffff880014bedcb8  EFLAGS: 00010282
RAX: 000000000000002f RBX: ffff880014a60012 RCX: ffff880017f01870
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000003724012 R08: 000000000000002c R09: ffff880000def000
R10: 000000000000002d R11: ffff880015d091e0 R12: 0000000000003fff
R13: ffff880017f01870 R14: 0000000000000000 R15: 0000000000003fff
FS:  00002ad23cbecaf0(0000) GS:ffffffff805d2000(0000) knlGS:0000000000000000
CS:  e033 DS: 0000 ES: 0000
Process ip (pid: 1359, threadinfo ffff880014bec000, task ffff8800144b77a0)
Stack:  0000000000000002  ffff880015e304c0  ffff880011f61000  0000000000000000 
0000000000000002  ffffffff8810b474  0000001e00000000  0000000000000100 
ffff880016f64000  ffff880016f64500 
Call Trace:
[<ffffffff8810b474>] :r8169:rtl8169_rx_fill+0x11e/0x188
[<ffffffff8810c6c6>] :r8169:rtl8169_init_ring+0x70/0x9f
[<ffffffff8810c9a3>] :r8169:rtl8169_open+0x9f/0x1c6
[<ffffffff80420ace>] dev_open+0x58/0x97
[<ffffffff8041e9d8>] dev_change_flags+0x5a/0x11a
[<ffffffff804534d2>] devinet_ioctl+0x235/0x59c
[<ffffffff804162b2>] sock_ioctl+0x1c1/0x1e5
[<ffffffff80244265>] do_ioctl+0x21/0x6b
[<ffffffff80231924>] vfs_ioctl+0x457/0x4b9
[<ffffffff8024ea38>] sys_ioctl+0x59/0x78
[<ffffffff80260106>] system_call+0x86/0x8b
[<ffffffff80260080>] system_call+0x0/0x8b


Code: 0f 0b 68 f6 7e 49 80 c2 8a 01 4d 85 ed 74 11 49 8b 85 18 02 
RIP  [<ffffffff802723ff>] dma_map_single+0x12d/0x17d
RSP <ffff880014bedcb8>
<0>Kernel panic - not syncing: Fatal exception

問題是 NIC 驅動程序有問題。我的研究表明,我本可以修補並重新編譯驅動程序,但換一個不同的 NIC 會更容易。

引用自:https://serverfault.com/questions/153355