From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerone Young Subject: RE: Dom0 crashing on x86_64 Date: Fri, 15 Jul 2005 14:11:17 -0500 Message-ID: <1121454677.3036.16.camel@thinkpad> References: <16A54BF5D6E14E4D916CE26C9AD3057502B06FCC@pdsmsx402.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <16A54BF5D6E14E4D916CE26C9AD3057502B06FCC@pdsmsx402.ccr.corp.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Li, Xin B" Cc: xen-devel@lists.xensource.com, David F Barrera , Vincent Hanquez List-Id: xen-devel@lists.xenproject.org Awsome! Patch works...can now do networking in x86-64 domU without crashing Xen. On Fri, 2005-07-15 at 16:26 +0800, Li, Xin B wrote: > 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 > Signed-off-by: Xiaofeng Ling > > -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@lists.xensource.com > http://lists.xensource.com/xen-devel > -- Jerone Young IBM Linux Technology Center jyoung5@us.ibm.com 512-838-1157 (T/L: 678-1157)