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

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 <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
> 
-- 
Jerone Young
IBM Linux Technology Center
jyoung5@xxxxxxxxxx
512-838-1157 (T/L: 678-1157)


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

<Prev in Thread] Current Thread [Next in Thread>