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-devel

RE: [Xen-devel] Dom0 crashing on x86_64

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] Dom0 crashing on x86_64
From: "Li, Xin B" <xin.b.li@xxxxxxxxx>
Date: Fri, 15 Jul 2005 16:26:05 +0800
Cc: David F Barrera <dfbp@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxx>
Delivery-date: Fri, 15 Jul 2005 08:24:53 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcWJFXuTV6DCTn/JRp2K2rug2dcsogAANWCQ
Thread-topic: [Xen-devel] Dom0 crashing on x86_64
This patch fixes x86_64 domU network crashes dom0.

This bug is caused by the size of netif_tx_request_t/netif_rx_response_t
on x86_64, which is using 8 byte alignment.  When PACKET is removed by
changeset 5648, their sizes are changed from 12 to 16, then
netif_tx_interface_t/netif_rx_interface_t will overflow a page.

Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>
Signed-off-by: Xiaofeng Ling <xiaofeng.lingi@xxxxxxxxx>

-Xin

diff -r 1d026c7023d2 xen/include/public/io/netif.h
--- a/xen/include/public/io/netif.h     Thu Jul 14 23:48:06 2005
+++ b/xen/include/public/io/netif.h     Fri Jul 15 19:55:23 2005
@@ -21,11 +21,11 @@
     s8       status;
 } netif_tx_response_t;

-typedef struct {
+typedef struct netif_rx_request {
     u16       id;    /* Echoed in response message.        */
 } netif_rx_request_t;

-typedef struct {
+typedef struct netif_rx_response {
     memory_t addr;   /* Machine address of packet.              */
     u16      csum_valid:1; /* Protocol checksum is validated?       */
     u16      id:15;
@@ -46,8 +46,13 @@
 #define MASK_NETIF_RX_IDX(_i) ((_i)&(NETIF_RX_RING_SIZE-1))
 #define MASK_NETIF_TX_IDX(_i) ((_i)&(NETIF_TX_RING_SIZE-1))

+#ifdef __x86_64__
+#define NETIF_TX_RING_SIZE 128
+#define NETIF_RX_RING_SIZE 128
+#else
 #define NETIF_TX_RING_SIZE 256
 #define NETIF_RX_RING_SIZE 256
+#endif

 /* This structure must fit in a memory page. */
 typedef struct netif_tx_interface {

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel