WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] Re: Is there something missing for my NIC passthough?

To: Pasi Kärkkäinen <pasik@xxxxxx>
Subject: [Xen-users] Re: Is there something missing for my NIC passthough?
From: lei yang <yanglei.fage@xxxxxxxxx>
Date: Fri, 28 May 2010 16:40:35 +0800
Cc: Xen Mailing List <xen-users@xxxxxxxxxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Fri, 28 May 2010 01:42:12 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=8s3UalhaFvIkmbonGbGadQHWez8iH+93sBOPkPxKuXE=; b=sF6ulfSJSgQcHynpqjM6nn1Rggpfl7hjo/RAhXBA4ndF5FtBaksNWb64NlQfnQNoKn UP46lo07LYycuMifYMkVZADXGkR94vgV0o7ztB7YS9jZsWOtL/GOeyW2M+4IChOAjKvK SM3hvtdGrxPhrAYgQTulKcm+T/Duo6g/zYyug=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=sxd0G5afrwXo3vsqDXqaYhdGjjST2pDYh6Q3BOAdafOZ6WCJyBKSk4GCHQg2tINg/R EOmIKmZhSuvZk1mRKhshzI7MhBtvDYf78GIE9DOqwJIlZRtkTQBCwZI9ySoPawSbPa8N THjHrqiIBhQ5LmPqlYzHu0mePvYd9L0TSFwBU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100528073800.GW17817@xxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <AANLkTilbgI2l-nbpukPJte58bCnCyPNkF0U4hy-vLhV-@xxxxxxxxxxxxxx> <20100527130846.GP17817@xxxxxxxxxxx> <AANLkTilsOtk8FhPwGzaaIqLy8hFEZKDNaUPx181FwSkI@xxxxxxxxxxxxxx> <AANLkTik8mzgpVDZlwwUKZPYliADl3yQ-FXOeykhSOZK_@xxxxxxxxxxxxxx> <20100527185215.GR17817@xxxxxxxxxxx> <AANLkTinuFuHWqOP7qNV4WePWK2nKjafVeO1FOVwJQtY4@xxxxxxxxxxxxxx> <20100528071821.GV17817@xxxxxxxxxxx> <AANLkTil9_go2snHQEercLROVoYcbjk2xgwdg1sN25nhy@xxxxxxxxxxxxxx> <20100528073800.GW17817@xxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Aha, I have got my pci-passthough working on 2.6.34 as Pasik's information
I update to http://git.kernel.org/?p=linux/kernel/git/konrad/xen.git;a=shortlog;h=refs/heads/pv/merge.2.6.34-rc7
For pci passthough just have one kernel config item "CONFIG_XEN_PCIDEV_FRONTEND=y" I enabled it


on domU
root@localhost:/root> uname -a
Linux localhost 2.6.34-rc7 #1 SMP Fri May 28 01:13:16 PDT 2010 i686 i686 i386 GNU/Linux
root@localhost:/root> lspci
00:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06)

It's strange

1. I specify the pci = ['05:00.0'] in domU.cfg but lspci in domU see "00:00.0"
2. when run xm crate -f domU.cfg -c it print calltrace but it can loginto domU, my dom0 use 2.6.33.3


[  537.251100] blkback.1.xvda1 used greatest stack depth: 5984 bytes left
[  481.466766] Restarting system.
root@localhost:/> [  537.833874] blktap_device_destroy: 6 callbacks suppressed
[  537.936903] blktap_sysfs_destroy
[  534.584965] blktap_sysfs_create: adding attributes for dev ebfd9b40
[  538.096286] blktap_sysfs_destroy
[  534.704450] blktap_sysfs_create: adding attributes for dev ece436c0
[  538.374434] BUG: scheduling while atomic: xenwatch/40/0x00000002
[  538.381142] Modules linked in:
[  538.384569] Pid: 40, comm: xenwatch Not tainted 2.6.33.3 #4
[  538.390791] Call Trace:
[  538.393529]  [<c1032285>] ? __schedule_bug+0x44/0x56
[  538.399068]  [<c14abf3a>] ? schedule+0x89/0x837
[  538.404131]  [<c119a930>] ? string+0x33/0x81
[  538.408900]  [<c11f5a71>] ? notify_remote_via_evtchn+0x19/0x59
[  538.415414]  [<c119b83e>] ? vsnprintf+0x157/0x2fa
[  538.420669]  [<c1006704>] ? xen_force_evtchn_callback+0xc/0x10
[  538.427182]  [<c1006f14>] ? check_events+0x8/0xc
[  538.432339]  [<c11f6336>] ? read_reply+0x81/0xf5
[  538.437497]  [<c1050e6e>] ? autoremove_wake_function+0x0/0x2d
[  538.443914]  [<c11f64fb>] ? xs_talkv+0x8a/0x121
[  538.448973]  [<c11f6676>] ? xs_single+0x29/0x2f
[  538.454031]  [<c11f6c29>] ? xenbus_read+0x2b/0x3b
[  538.459284]  [<c11f6c61>] ? xenbus_gather+0x28/0x71
[  538.464732]  [<c11f52b0>] ? xenbus_read_driver_state+0x1c/0x2f
[  538.471247]  [<c11fb24a>] ? pciback_be_watch+0x3d/0x208
[  538.477081]  [<c1006704>] ? xen_force_evtchn_callback+0xc/0x10
[  538.483594]  [<c1006f14>] ? check_events+0x8/0xc
[  538.488749]  [<c1006f0b>] ? xen_restore_fl_direct_end+0x0/0x1
[  538.495166]  [<c10bf103>] ? kfree+0x11e/0x126
[  538.500032]  [<c11f65d7>] ? xs_watch+0x45/0x4e
[  538.504996]  [<c11f69c7>] ? register_xenbus_watch+0xcc/0xd4
[  538.511220]  [<c11f58d9>] ? xenbus_watch_path+0x1b/0x46
[  538.517057]  [<c11fb836>] ? pciback_xenbus_probe+0x101/0x11f
[  538.523377]  [<c11f74b4>] ? xenbus_dev_probe+0x63/0xd6
[  538.529118]  [<c126393c>] ? driver_probe_device+0x76/0xfe
[  538.535147]  [<c12631a1>] ? bus_for_each_drv+0x37/0x5f
[  538.540887]  [<c1263aa3>] ? device_attach+0x41/0x51
[  538.546333]  [<c1263a1f>] ? __device_attach+0x0/0x28
[  538.551878]  [<c1263048>] ? bus_probe_device+0x19/0x2d
[  538.557615]  [<c1261fdc>] ? device_add+0x305/0x443
[  538.562964]  [<c1196642>] ? kobject_init+0x33/0x69
[  538.568313]  [<c1261a0c>] ? device_initialize+0x19/0x67
[  538.574148]  [<c11f7168>] ? xenbus_probe_node+0xd3/0x141
[  538.580081]  [<c11f7301>] ? xenbus_dev_changed+0x12b/0x143
[  538.586208]  [<c1006f14>] ? check_events+0x8/0xc
[  538.591364]  [<c11f628e>] ? xenwatch_thread+0xe0/0x107
[  538.597102]  [<c1050e6e>] ? autoremove_wake_function+0x0/0x2d
[  538.603520]  [<c11f61ae>] ? xenwatch_thread+0x0/0x107
[  538.609160]  [<c1050acd>] ? kthread+0x61/0x66
[  538.614025]  [<c1050a6c>] ? kthread+0x0/0x66
[  538.618794]  [<c10093b6>] ? kernel_thread_helper+0x6/0x10
[  538.639586] BUG: scheduling while atomic: xenwatch/40/0x00000002
[  538.646294] Modules linked in:
[  538.649709] Pid: 40, comm: xenwatch Not tainted 2.6.33.3 #4
[  538.655932] Call Trace:
[  538.658666]  [<c1032285>] ? __schedule_bug+0x44/0x56
[  538.664212]  [<c14abf3a>] ? schedule+0x89/0x837
[  538.669273]  [<c11f5a71>] ? notify_remote_via_evtchn+0x19/0x59
[  538.675786]  [<c119b83e>] ? vsnprintf+0x157/0x2fa
[  538.681040]  [<c1006704>] ? xen_force_evtchn_callback+0xc/0x10
[  538.687554]  [<c1006f14>] ? check_events+0x8/0xc
[  538.692710]  [<c11f6336>] ? read_reply+0x81/0xf5
[  538.697866]  [<c1050e6e>] ? autoremove_wake_function+0x0/0x2d
[  538.704281]  [<c11f64fb>] ? xs_talkv+0x8a/0x121
[  538.709341]  [<c11f6676>] ? xs_single+0x29/0x2f
[  538.714400]  [<c11f6c29>] ? xenbus_read+0x2b/0x3b
[  538.719651]  [<c11f6cbf>] ? xenbus_scanf+0x15/0x49
[  538.725000]  [<c11fb272>] ? pciback_be_watch+0x65/0x208
[  538.730836]  [<c1006704>] ? xen_force_evtchn_callback+0xc/0x10
[  538.737349]  [<c1006f14>] ? check_events+0x8/0xc
[  538.742504]  [<c1006f0b>] ? xen_restore_fl_direct_end+0x0/0x1
[  538.748922]  [<c10bf103>] ? kfree+0x11e/0x126
[  538.753788]  [<c11f65d7>] ? xs_watch+0x45/0x4e
[  538.758751]  [<c11f69c7>] ? register_xenbus_watch+0xcc/0xd4
[  538.764973]  [<c11f58d9>] ? xenbus_watch_path+0x1b/0x46
[  538.770809]  [<c11fb836>] ? pciback_xenbus_probe+0x101/0x11f
[  538.777129]  [<c11f74b4>] ? xenbus_dev_probe+0x63/0xd6
[  538.782869]  [<c126393c>] ? driver_probe_device+0x76/0xfe
[  538.788898]  [<c12631a1>] ? bus_for_each_drv+0x37/0x5f
[  538.794637]  [<c1263aa3>] ? device_attach+0x41/0x51
[  538.800086]  [<c1263a1f>] ? __device_attach+0x0/0x28
[  538.805630]  [<c1263048>] ? bus_probe_device+0x19/0x2d
[  538.811368]  [<c1261fdc>] ? device_add+0x305/0x443
[  538.816719]  [<c1196642>] ? kobject_init+0x33/0x69
[  538.822069]  [<c1261a0c>] ? device_initialize+0x19/0x67
[  538.827903]  [<c11f7168>] ? xenbus_probe_node+0xd3/0x141
[  538.833834]  [<c11f7301>] ? xenbus_dev_changed+0x12b/0x143
[  538.839961]  [<c1006f14>] ? check_events+0x8/0xc
[  538.845118]  [<c11f628e>] ? xenwatch_thread+0xe0/0x107
[  538.850855]  [<c1050e6e>] ? autoremove_wake_function+0x0/0x2d
[  538.857305]  [<c11f61ae>] ? xenwatch_thread+0x0/0x107
[  538.862946]  [<c1050acd>] ? kthread+0x61/0x66
[  538.867811]  [<c1050a6c>] ? kthread+0x0/0x66
[  538.872579]  [<c10093b6>] ? kernel_thread_helper+0x6/0x10
[  538.880348] BUG: scheduling while atomic: xenwatch/40/0x00000002
[  538.887058] Modules linked in:
[  538.890481] Pid: 40, comm: xenwatch Not tainted 2.6.33.3 #4
[  538.896702] Call Trace:
[  538.899437]  [<c1032285>] ? __schedule_bug+0x44/0x56
[  538.904984]  [<c14abf3a>] ? schedule+0x89/0x837
[  538.910045]  [<c102d31e>] ? need_resched+0x11/0x1a
[  538.915395]  [<c14ac6bd>] ? schedule+0x80c/0x837
[  538.920550]  [<c119a930>] ? string+0x33/0x81
[  538.925319]  [<c11f5a71>] ? notify_remote_via_evtchn+0x19/0x59
[  538.931834]  [<c119b83e>] ? vsnprintf+0x157/0x2fa
[  538.937087]  [<c1006704>] ? xen_force_evtchn_callback+0xc/0x10
[  538.943601]  [<c1006f14>] ? check_events+0x8/0xc
[  538.948758]  [<c11f6336>] ? read_reply+0x81/0xf5
[  538.953914]  [<c1050e6e>] ? autoremove_wake_function+0x0/0x2d
[  538.960332]  [<c11f64fb>] ? xs_talkv+0x8a/0x121
[  538.965391]  [<c11f6676>] ? xs_single+0x29/0x2f
[  538.970450]  [<c11f6c29>] ? xenbus_read+0x2b/0x3b
[  538.975703]  [<c11f6cbf>] ? xenbus_scanf+0x15/0x49
[  538.981053]  [<c11fb2e8>] ? pciback_be_watch+0xdb/0x208
[  538.986889]  [<c1006704>] ? xen_force_evtchn_callback+0xc/0x10
[  538.993404]  [<c1006f14>] ? check_events+0x8/0xc
[  538.998562]  [<c1006f0b>] ? xen_restore_fl_direct_end+0x0/0x1
[  539.004978]  [<c10bf103>] ? kfree+0x11e/0x126
[  539.009843]  [<c11f65d7>] ? xs_watch+0x45/0x4e
[  539.014807]  [<c11f69c7>] ? register_xenbus_watch+0xcc/0xd4
[  539.021031]  [<c11f58d9>] ? xenbus_watch_path+0x1b/0x46
[  539.026867]  [<c11fb836>] ? pciback_xenbus_probe+0x101/0x11f
[  539.033187]  [<c11f74b4>] ? xenbus_dev_probe+0x63/0xd6
[  539.038925]  [<c126393c>] ? driver_probe_device+0x76/0xfe
[  539.044956]  [<c12631a1>] ? bus_for_each_drv+0x37/0x5f
[  539.050695]  [<c1263aa3>] ? device_attach+0x41/0x51
[  539.056141]  [<c1263a1f>] ? __device_attach+0x0/0x28
[  539.061686]  [<c1263048>] ? bus_probe_device+0x19/0x2d
[  539.067423]  [<c1261fdc>] ? device_add+0x305/0x443
[  539.072773]  [<c1196642>] ? kobject_init+0x33/0x69
[  539.078122]  [<c1261a0c>] ? device_initialize+0x19/0x67
[  539.083957]  [<c11f7168>] ? xenbus_probe_node+0xd3/0x141
[  539.089889]  [<c11f7301>] ? xenbus_dev_changed+0x12b/0x143
[  539.096014]  [<c1006f14>] ? check_events+0x8/0xc
[  539.101169]  [<c11f628e>] ? xenwatch_thread+0xe0/0x107
[  539.106908]  [<c1050e6e>] ? autoremove_wake_function+0x0/0x2d
[  539.113324]  [<c11f61ae>] ? xenwatch_thread+0x0/0x107
[  539.118966]  [<c1050acd>] ? kthread+0x61/0x66
[  539.123833]  [<c1050a6c>] ? kthread+0x0/0x66
[  539.128602]  [<c10093b6>] ? kernel_thread_helper+0x6/0x10
[  539.158338] BUG: scheduling while atomic: xenwatch/40/0x00000002
[  539.165038] Modules linked in:
[  539.168462] Pid: 40, comm: xenwatch Not tainted 2.6.33.3 #4
[  539.174685] Call Trace:
[  539.177419]  [<c1032285>] ? __schedule_bug+0x44/0x56
[  539.182965]  [<c14abf3a>] ? schedule+0x89/0x837
[  539.188025]  [<c11f5a71>] ? notify_remote_via_evtchn+0x19/0x59
[  539.194539]  [<c1006704>] ? xen_force_evtchn_callback+0xc/0x10
[  539.201053]  [<c1006f14>] ? check_events+0x8/0xc
[  539.206209]  [<c11f6336>] ? read_reply+0x81/0xf5
[  539.211367]  [<c1050e6e>] ? autoremove_wake_function+0x0/0x2d
[  539.217785]  [<c11f64fb>] ? xs_talkv+0x8a/0x121
[  539.222845]  [<c11f6b5f>] ? xenbus_write+0x4f/0x72
[  539.228196]  [<c11f6bef>] ? xenbus_printf+0x6d/0x7c
[  539.233644]  [<c11fb03e>] ? pciback_publish_pci_dev+0x59/0x68
[  539.240062]  [<c1006f14>] ? check_events+0x8/0xc
[  539.245218]  [<c1006704>] ? xen_force_evtchn_callback+0xc/0x10
[  539.251732]  [<c1006f14>] ? check_events+0x8/0xc
[  539.256889]  [<c11fcedc>] ? pciback_add_pci_dev+0x1b9/0x1c9
[  539.263113]  [<c11fb1be>] ? pciback_export_device+0x54/0xa3
[  539.269337]  [<c11fafe5>] ? pciback_publish_pci_dev+0x0/0x68
[  539.275657]  [<c11fb33d>] ? pciback_be_watch+0x130/0x208
[  539.281591]  [<c1006704>] ? xen_force_evtchn_callback+0xc/0x10
[  539.288105]  [<c1006f14>] ? check_events+0x8/0xc
[  539.293263]  [<c1006f0b>] ? xen_restore_fl_direct_end+0x0/0x1
[  539.299680]  [<c10bf103>] ? kfree+0x11e/0x126
[  539.304545]  [<c11f65d7>] ? xs_watch+0x45/0x4e
[  539.309508]  [<c11f69c7>] ? register_xenbus_watch+0xcc/0xd4
[  539.315732]  [<c11fb836>] ? pciback_xenbus_probe+0x101/0x11f
[  539.322052]  [<c11f74b4>] ? xenbus_dev_probe+0x63/0xd6
[  539.327790]  [<c126393c>] ? driver_probe_device+0x76/0xfe
[  539.333819]  [<c12631a1>] ? bus_for_each_drv+0x37/0x5f
[  539.339559]  [<c1263aa3>] ? device_attach+0x41/0x51
[  539.345007]  [<c1263a1f>] ? __device_attach+0x0/0x28
[  539.350552]  [<c1263048>] ? bus_probe_device+0x19/0x2d
[  539.356289]  [<c1261fdc>] ? device_add+0x305/0x443
[  539.361638]  [<c1196642>] ? kobject_init+0x33/0x69
[  539.366989]  [<c1261a0c>] ? device_initialize+0x19/0x67
[  539.372823]  [<c11f7168>] ? xenbus_probe_node+0xd3/0x141
[  539.378755]  [<c11f7301>] ? xenbus_dev_changed+0x12b/0x143
[  539.384881]  [<c1006f14>] ? check_events+0x8/0xc
[  539.390039]  [<c11f628e>] ? xenwatch_thread+0xe0/0x107
[  539.395778]  [<c1050e6e>] ? autoremove_wake_function+0x0/0x2d
[  539.402195]  [<c11f61ae>] ? xenwatch_thread+0x0/0x107
[  539.407837]  [<c1050acd>] ? kthread+0x61/0x66
[  539.412703]  [<c1050a6c>] ? kthread+0x0/0x66
[  539.417470]  [<c10093b6>] ? kernel_thread_helper+0x6/0x10
[  539.425964] pciback 0000:05:00.0: device has been assigned to another domain! Over-writting the ownership, but beware.
[  539.437956] BUG: scheduling while atomic: xenwatch/40/0x00000002
[  539.444663] Modules linked in:
[  539.448080] Pid: 40, comm: xenwatch Not tainted 2.6.33.3 #4
[  539.454301] Call Trace:


On Fri, May 28, 2010 at 3:38 PM, Pasi Kärkkäinen <pasik@xxxxxx> wrote:
On Fri, May 28, 2010 at 03:30:17PM +0800, lei yang wrote:
>    On Fri, May 28, 2010 at 3:18 PM, Pasi Kärkkäinen <[1]pasik@xxxxxx> wrote:
>
>      On Fri, May 28, 2010 at 03:16:20PM +0800, lei yang wrote:
>      >      >    loĀ Ā Ā Ā Ā Ā Ā  Link encap:Local Loopback
>      >      >    Ā Ā Ā Ā Ā Ā Ā Ā Ā  LOOPBACKĀ  MTU:16436Ā  Metric:1
>      >      >    Ā Ā Ā Ā Ā Ā Ā Ā Ā  RX packets:0 errors:0 dropped:0
>      overruns:0
>      >      frame:0
>      >      >    Ā Ā Ā Ā Ā Ā Ā Ā Ā  TX packets:0 errors:0 dropped:0
>      overruns:0
>      >      carrier:0
>      >      >    Ā Ā Ā Ā Ā Ā Ā Ā Ā  collisions:0 txqueuelen:0
>      >      >    Ā Ā Ā Ā Ā Ā Ā Ā Ā  RX bytes:0 (0.0 b)Ā  TX bytes:0 (0.0 b)
>      >      >    [7]root@localhost:/root> lspci
>      >      >    [8]root@localhost:/root>
>      >      >    Ā
>      >      >
>      >
>      >      Does your domU kernel have xen-pcifront driver? is it loaded?
>      >      that's required for PCI passthrough to PV guests.
>      >
>      >      Note that upstream ([1][2]kernel.org) kernels don't yet have
>      xen-pcifront
>      >      included.
>      >
>      >    My kernel is from [2][3]kernel.org the latest version, if I use
>      this version
>      >    to do my pci ehternet pci passthough
>      >    How can I do it?
>      >
>
>      So you're missing xen-pcifront (and swiotlb) support. That's your
>      problem.
>      [4]http://wiki.xensource.com/xenwiki/XenPCIpassthrough
>
>      Instructions there about how to get a kernel with xen-pcifront and
>      swiotlb.
>
>    Thanks, I had saw this page, Unfortunately, that patch is just support
>    2.6.32 ore 2.6.33
>

Konrad (CC) is in the process of preparing xen-pcifront and swiotlb patches
for upstream Linux merge. Until the patches are merged you have to keep using
what you have, or forward-port the patches yourself to newer kernels.

It seems konrad has a port to 2.6.34-rc7 here:
http://git.kernel.org/?p=linux/kernel/git/konrad/xen.git;a=shortlog;h=refs/heads/pv/merge.2.6.34-rc7

He's been away for a vacation so maybe he'll update the tree to 2.6.34 final at some point.

At the moment it makes sense to use 2.6.32 kernel for the domU since that's the
long-term maintained kernel for both kernel.org and xen.org. Jeremy's git tree
has xen-pcifront and swiotlb patches included in the xen/stable-2.6.32.x branch.

-- Pasi




--
"We learn from failure, not from success!"
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users