direct-io.hg

annotate patches/linux-2.6.16.29/net-gso-1-check-dodgy.patch @ 11750:d845c9522d9e

[HVM][SVM] Check if SVM is disabled by the BIOS before enabling it.

Newer BIOS implementations will be able to disable the SVM feature,
although an additional test of an MSR (VMCR 0xC0010114 bit 4) is
necessary (set equals disabled). Bit 4 of MSR 0xc0010114 returns 0
(SVM enabled) on machines with older BIOS' without the SVM disable
feature support.

Signed-off-by: Wei Huang <wei.huang2@amd.com>=20
Signed-off-by: Tom Woller <thomas.woller@amd.com>=20
author kfraser@localhost.localdomain
date Thu Oct 12 16:12:10 2006 +0100 (2006-10-12)
parents 041be3f6b38e
children
rev   line source
Christian@11536 1 diff -pruN ../orig-linux-2.6.16.29/net/ipv4/tcp.c ./net/ipv4/tcp.c
Christian@11536 2 --- ../orig-linux-2.6.16.29/net/ipv4/tcp.c 2006-09-19 13:59:20.000000000 +0100
Christian@11536 3 +++ ./net/ipv4/tcp.c 2006-09-19 13:59:42.000000000 +0100
kfraser@10720 4 @@ -2042,13 +2042,19 @@ struct sk_buff *tcp_tso_segment(struct s
kfraser@10720 5 if (!pskb_may_pull(skb, thlen))
kfraser@10720 6 goto out;
kfraser@10720 7
kfraser@10720 8 - segs = NULL;
kfraser@10720 9 - if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST))
kfraser@10720 10 - goto out;
kfraser@10720 11 -
kfraser@10720 12 oldlen = (u16)~skb->len;
kfraser@10720 13 __skb_pull(skb, thlen);
kfraser@10720 14
kfraser@10720 15 + if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) {
kfraser@10720 16 + /* Packet is from an untrusted source, reset gso_segs. */
kfraser@10720 17 + int mss = skb_shinfo(skb)->gso_size;
kfraser@10720 18 +
kfraser@10720 19 + skb_shinfo(skb)->gso_segs = (skb->len + mss - 1) / mss;
kfraser@10720 20 +
kfraser@10720 21 + segs = NULL;
kfraser@10720 22 + goto out;
kfraser@10720 23 + }
kfraser@10720 24 +
kfraser@10720 25 segs = skb_segment(skb, features);
kfraser@10720 26 if (IS_ERR(segs))
kfraser@10720 27 goto out;