From: Jerone Young <jyoung5@us.ibm.com>
To: "Li, Xin B" <xin.b.li@intel.com>
Cc: xen-devel@lists.xensource.com, David F Barrera <dfbp@us.ibm.com>,
Vincent Hanquez <vincent.hanquez@cl.cam.ac.uk>
Subject: RE: Dom0 crashing on x86_64
Date: Fri, 15 Jul 2005 14:11:17 -0500 [thread overview]
Message-ID: <1121454677.3036.16.camel@thinkpad> (raw)
In-Reply-To: <16A54BF5D6E14E4D916CE26C9AD3057502B06FCC@pdsmsx402.ccr.corp.intel.com>
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@intel.com>
> Signed-off-by: Xiaofeng Ling <xiaofeng.lingi@intel.com>
>
> -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)
next prev parent reply other threads:[~2005-07-15 19:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-15 8:26 Dom0 crashing on x86_64 Li, Xin B
2005-07-15 19:11 ` Jerone Young [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-07-15 8:07 Li, Xin B
2005-07-15 8:20 ` Keir Fraser
2005-07-13 14:39 Li, Xin B
2005-07-12 18:09 David F Barrera
2005-07-12 22:44 ` Vincent Hanquez
2005-07-13 14:07 ` David F Barrera
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1121454677.3036.16.camel@thinkpad \
--to=jyoung5@us.ibm.com \
--cc=dfbp@us.ibm.com \
--cc=vincent.hanquez@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.com \
--cc=xin.b.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.