Hello,
Recently I've been trying to enable the networking in a conventional DomU (not
dom0less).
The approach I used was the one described here:
https://wiki.xen.org/wiki/Xen_Networking#Bridging.
But when I use xl to create DomU, I get a Kernel OOPS in Dom0. The setup is
still responsive after this
and DomU boots successfully. However, if I try to enable `eth0` in DomU (using
ip link dev set eth0 up),
I get a Kernel Panic in Dom0.
Here are the complete steps:
1. Boot Dom0 and configure bridge:
* brctl addbr xenbr0
* brctl addif xenbr0 eth0
* ip link set dev xenbr0 up
* ip link set dev eth0 up
* dhclient xenbr0
1. ifconfig xenbr0 (ping 8.8.8.8 works):
xenbr0 Link encap:Ethernet HWaddr B2:62:37:C9:BB:D7
inet addr:192.168.0.185 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::b062:37ff:fec9:bbd7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:703 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:88213 (86.1 KiB) TX bytes:3088 (3.0 KiB)
1. ifconfig eth0:
eth0 Link encap:Ethernet HWaddr B2:62:37:C9:BB:D7
inet6 addr: fe80::b062:37ff:fec9:bbd7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1535 errors:0 dropped:2 overruns:0 frame:0
TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:450476 (439.9 KiB) TX bytes:4248 (4.1 KiB)
Interrupt:59 Base address:0xc000
1. Add bridge to DomU config file:
vif = [ 'bridge=xenbr0' ]
1. root@s32g274aevb-Dom0:~# xl create /etc/xen/domU1.cfg
After this I get the Kernel OOPS, because of a failed memory
access
[ 413.367873] Unable to handle kernel paging request at virtual address
000006c000020070
In
[ 413.548189] xenvif_rx_ring_slots_available+0x40/0xa0
[xen_netback]
The full log is attached at [0]<https://pastebin.com/sJLfd4gL>.
Using gdb, I found out that the access corresponds to the following source code
lines:
==========
(gdb) l *xenvif_rx_ring_slots_available+0x40
0x65b0 is in xenvif_rx_ring_slots_available
(/usr/src/kernel/include/linux/skbuff.h:4084).
4082 static inline bool skb_is_gso(const struct sk_buff *skb)
4083 {
4084 return skb_shinfo(skb)->gso_size;
4085 }
==========
1. DomU boots, and then: root@s32g274aevb-DomU1:~# ip link set dev eth0 up
After this, I get a kernel panic in Dom0 because of another failed memory
access
[ 5338.574809] Unable to handle kernel paging request at virtual
address 000000c0ffff0028
in
[ 5338.753128] xenvif_tx_build_gops+0x528/0xef8 [xen_netback]
The full log is attached at [1]<https://pastebin.com/iaF1q3UM>.
Using gdb again, I found out the corresponding source code:
==========
(gdb) l *xenvif_tx_build_gops+0x528
0xce8 is in xenvif_tx_build_gops (/usr/src/kernel/include/linux/skbuff.h:1272).
1269 #ifdef NET_SKBUFF_DATA_USES_OFFSET
1270 static inline unsigned char *skb_end_pointer(const struct sk_buff
*skb)
1271 {
1272 return skb->head + skb->end;
1273 }
==========
Do you have any idea why this occurs? Have I misconfigured anything?
I've also tried to pass a static IP configuration for DomU in the config file,
and because it automatically enables eth0 at boot time, I no longer get the
oops, but a panic directly.
Thank you very much for your help,
Andrei Cherechesu,
NXP Semiconductors