VNIF bug with PV-on-HVM on IA64
Hi All,
We were testing VNIF with PV-on-HVM. When VNIF is used on the IA64 architecture, the kernel panic occurs. It happens when the ping command is executed from other machines.
It is generated in the following environment. Architecture : only IA64
Xen : Xen-3.1
GuestOS : RHEL4U4(2.6.9-42), RHEL4U5(2.6.9-55)
GuestOS is not generated in RHEL5GA(2.6.18-8). Moreover, it is not generated in the x86 architecture.
When having confirmed it before, xen-unstable.hg was generated. It seems that the problem remains now.
We investigated this problem a little. The kernel panic occurs by the following __skb_dequeue().
drivers/xen/netfront/netfront.c
1300 static int netif_poll(struct net_device *dev, int *pbudget) 1301 {
....
1449 while ((skb = __skb_dequeue(&rxq)) != NULL) {
1450 struct page *page = NETFRONT_SKB_CB(skb)->page; 1451 void *vaddr = page_address(page); 1452 unsigned offset = NETFRONT_SKB_CB(skb)->offset;
1453
1454 memcpy(skb->data, vaddr + offset, skb_headlen(skb));
An illegal address returns by __skb_dequeue(). It seems to relate the sk_buff structure different. (As for generated RHEL4U4/U5 and RHELGA not generated, the sk_buff structure is different.)
The problem didn't occur if the NETFRONT_SKB_CB macro is not used like the previous changeset. The difference is for your information appended. (netfront.diff)
We do not understand the cause still generated well. Why does this problem occur? Please give advice to us some.
Best Regards,
--
Takanori Kasai
drivers/xen/netfront/netfront.c +6 -6
@@ -1362,8 +1362,8 @@ err: } } -NETFRONT_SKB_CB (skb)->page =skb_shinfo (skb)->frags[0 ].page; -NETFRONT_SKB_CB (skb)->offset = rx->offset; + skb->nh.raw = (void *)skb_shinfo (skb)->frags[0 ].page; + skb->h.raw = skb->nh.raw + rx->offset; len = rx->status;if (len >RX_COPY_THRESHOLD )
@@ -1447,11 +1447,11 @@ err:kfree_skb (skb);while ((skb =__skb_dequeue (&rxq)) !=NULL ) { -struct page *page =NETFRONT_SKB_CB (skb)->page; +struct page *page = (struct page *)skb->nh.raw;void *vaddr =page_address (page); -unsigned offset =NETFRONT_SKB_CB (skb)->offset; - -memcpy (skb->data, vaddr + offset,skb_headlen (skb)); + +memcpy (skb->data, vaddr + (skb->h.raw - skb->nh.raw), +skb_headlen (skb));if (page !=skb_shinfo (skb)->frags[0 ].page)__free_page (page);
_______________________________________________
Xen-ia64-devel mailing list
[email protected]
http://lists.xensource.com/xen-ia64-devel
Quoted 4 lines · Kasai Takanori
We were testing VNIF with PV-on-HVM.
When VNIF is used on the IA64 architecture, the kernel panic occurs. It happens when the ping command is executed from other machines.
Please post the panic output.
Thanks,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtHi,
Thank you for your reply.
Quoted 4 lines
Quoted 2 lines
We were testing VNIF with PV-on-HVM. When VNIF is used on the IA64 architecture, the kernel panic occurs. It happens when the ping command is executed from other machines.
Please post the panic output.
I attached the panic output:
- pvdrv-linux-xen31-kpanic.log
Best Regards,
--
Takanori Kasai
[root@pq171-vm ~]# swapper[0]: General Exception: IA-64 Reserved Register/Field fault (data access) 17179869232 [1]
Modules linked in: md5 ipv6 parport_pc lp parport autofs4 sunrpc ds yenta_socket pcmcia_core lpfcdfc(U) lpfc(U) scsi_transport_fc scsi_mod vfat fat dm_mirror dm_mod button 8139cp mii ext3 jbd xen_vnif(U) xen_vbd(U) xen_platform_pci(U)
Pid: 0, CPU 0, comm: swapper
psr : 0000101008026018 ifs : 8000000000001a37 ip : [<a000000200013f00>] Not tainted
ip is at netif_poll+0xae0/0x1c00 [xen_vnif]
unat: 0000000000000000 pfs : 0000000000001a37 rsc : 0000000000000000
rnat: e00000023d7a7980 bsps: 00000000ab0c7c0a pr : 0000000000015aa5
ldrs: 0000000000000000 ccv : 0000000000000000 fpsr: 0009804c0270033f csd : 0000000000000000 ssd : 0000000000000000
b0 : a000000200014080 b6 : a0000001004beec0 b7 : 0000000000000000 f6 : 000000000000000000000 f7 : 000000000000000000000 f8 : 000000000000000000000 f9 : 000000000000000000000 f10 : 000000000000000000000 f11 : 000000000000000000000 r1 : a000000200210000 r2 : e00000023d3bc084 r3 : e00000023e1de480 r8 : 0000000000000000 r9 : 6973726531206e7f r10 : 000000002d4c5830 r11 : 0000000000000000 r12 : a0000001006e7b10 r13 : a0000001006e0000 r14 : 0000000000000000 r15 : 6973726531206e6f r16 : 00000000000000c0 r17 : 0000000000000019 r18 : e00000023d3bc090 r19 : a000000100a753b0 r20 : a000000100a753b0 r21 : a0000001006e0dd4 r22 : 0000000000004000 r23 : 0000000000004000 r24 : a0000001007ce9d0 r25 : e00000023ec79c00 r26 : 0000000000000000 r27 : 0000000000000000 r28 : e000000238226558 r29 : 0000000000000000 r30 : 0000000000004000 r31 : 0000000000004000
Call Trace:
[<a000000100016da0>] show_stack+0x80/0xa0
sp=a0000001006e7520 bsp=a0000001006e1490
[<a0000001000176b0>] show_regs+0x890/0x8c0
sp=a0000001006e76f0 bsp=a0000001006e1448
[<a00000010003e8f0>] die+0x150/0x240
sp=a0000001006e7710 bsp=a0000001006e1408
[<a00000010003ea20>] die_if_kernel+0x40/0x60
sp=a0000001006e7710 bsp=a0000001006e13d0
[<a00000010003fb70>] ia64_fault+0x990/0x15a0
sp=a0000001006e7710 bsp=a0000001006e1378
[<a00000010000f600>] ia64_leave_kernel+0x0/0x260
sp=a0000001006e7940 bsp=a0000001006e1378
[<a000000200013f00>] netif_poll+0xae0/0x1c00 [xen_vnif]
sp=a0000001006e7b10 bsp=a0000001006e11b8
[<a000000100495770>] net_rx_action+0x210/0x4a0
sp=a0000001006e7ba0 bsp=a0000001006e1150
[<a000000100084a30>] __do_softirq+0x1f0/0x240
sp=a0000001006e7bb0 bsp=a0000001006e10c0
[<a000000100084af0>] do_softirq+0x70/0xc0
sp=a0000001006e7bb0 bsp=a0000001006e1060
[<a000000100015dd0>] ia64_handle_irq+0x1b0/0x1e0
sp=a0000001006e7bb0 bsp=a0000001006e1018
[<a00000010000f600>] ia64_leave_kernel+0x0/0x260
sp=a0000001006e7bb0 bsp=a0000001006e1018
[<a0000001000162a0>] ia64_pal_call_static+0x80/0xc0
sp=a0000001006e7d80 bsp=a0000001006e0fc0
[<a000000100017940>] default_idle+0x140/0x1e0
sp=a0000001006e7d80 bsp=a0000001006e0f70
[<a000000100017b00>] cpu_idle+0x120/0x2c0
sp=a0000001006e7e20 bsp=a0000001006e0f28
[<a0000001000091b0>] rest_init+0xb0/0x120
sp=a0000001006e7e20 bsp=a0000001006e0f10
[<a000000100680cf0>] start_kernel+0x4b0/0x6c0
sp=a0000001006e7e20 bsp=a0000001006e0ea8
[<a000000100008190>] __end_ivt_text+0x270/0x290
sp=a0000001006e7e30 bsp=a0000001006e0e10
Kernel panic - not syncing: Fatal exception_______________________________________________
Xen-ia64-devel mailing list
[email protected]
http://lists.xensource.com/xen-ia64-devel