Change-Id: Ic002887facd178b79fc2c02f4b327f3a5c16fe74
Reviewed-on: http://photon-jenkins.eng.vmware.com/1096
Tested-by: jenkins-photon <wangnan2015@hotmail.com>
Reviewed-by: suezzelur <anishs@vmware.com>
... | ... |
@@ -164,7 +164,7 @@ CONFIG_CGROUP_PERF=y |
164 | 164 |
CONFIG_CGROUP_SCHED=y |
165 | 165 |
CONFIG_FAIR_GROUP_SCHED=y |
166 | 166 |
CONFIG_CFS_BANDWIDTH=y |
167 |
-CONFIG_RT_GROUP_SCHED=y |
|
167 |
+# CONFIG_RT_GROUP_SCHED is not set |
|
168 | 168 |
CONFIG_BLK_CGROUP=y |
169 | 169 |
# CONFIG_DEBUG_BLK_CGROUP is not set |
170 | 170 |
CONFIG_CGROUP_WRITEBACK=y |
... | ... |
@@ -158,7 +158,7 @@ CONFIG_CGROUP_PERF=y |
158 | 158 |
CONFIG_CGROUP_SCHED=y |
159 | 159 |
CONFIG_FAIR_GROUP_SCHED=y |
160 | 160 |
CONFIG_CFS_BANDWIDTH=y |
161 |
-CONFIG_RT_GROUP_SCHED=y |
|
161 |
+# CONFIG_RT_GROUP_SCHED is not set |
|
162 | 162 |
CONFIG_BLK_CGROUP=y |
163 | 163 |
# CONFIG_DEBUG_BLK_CGROUP is not set |
164 | 164 |
CONFIG_CGROUP_WRITEBACK=y |
165 | 165 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,42 @@ |
0 |
+Users report that under VMWare, er32(TIMINCA) returns zero. |
|
1 |
+This causes division by zero at init time as follows: |
|
2 |
+ |
|
3 |
+ ==> incvalue = er32(TIMINCA) & E1000_TIMINCA_INCVALUE_MASK; |
|
4 |
+ for (i = 0; i < E1000_MAX_82574_SYSTIM_REREADS; i++) { |
|
5 |
+ /* latch SYSTIMH on read of SYSTIML */ |
|
6 |
+ systim_next = (cycle_t)er32(SYSTIML); |
|
7 |
+ systim_next |= (cycle_t)er32(SYSTIMH) << 32; |
|
8 |
+ time_delta = systim_next - systim; |
|
9 |
+ temp = time_delta; |
|
10 |
+ ====> rem = do_div(temp, incvalue); |
|
11 |
+This change makes kernel survive this, and users report that |
|
12 |
+NIC does work after this change. |
|
13 |
+ |
|
14 |
+Since on real hardware incvalue is never zero, this should not affect |
|
15 |
+real hardware use case. |
|
16 |
+ |
|
17 |
+Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com> |
|
18 |
+CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
|
19 |
+CC: "Ruinskiy, Dima" <dima.ruinskiy@intel.com> |
|
20 |
+CC: intel-wired-lan@lists.osuosl.org |
|
21 |
+CC: netdev@vger.kernel.org |
|
22 |
+CC: LKML <linux-kernel@vger.kernel.org> |
|
23 |
+--- |
|
24 |
+ drivers/net/ethernet/intel/e1000e/netdev.c | 3 ++- |
|
25 |
+ 1 file changed, 2 insertions(+), 1 deletion(-) |
|
26 |
+diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c |
|
27 |
+index 269087c..0626935 100644 |
|
28 |
+--- a/drivers/net/ethernet/intel/e1000e/netdev.c |
|
29 |
+@@ -4315,7 +4315,8 @@ static cycle_t e1000e_cyclecounter_read(const struct cyclecounter *cc) |
|
30 |
+ |
|
31 |
+ time_delta = systim_next - systim; |
|
32 |
+ temp = time_delta; |
|
33 |
+- rem = do_div(temp, incvalue); |
|
34 |
++ /* VMWare users have seen incvalue of zero, don't div / 0 */ |
|
35 |
++ rem = incvalue ? do_div(temp, incvalue) : (time_delta != 0); |
|
36 |
+ |
|
37 |
+ systim = systim_next; |
|
38 |
+ |
|
39 |
+-- |
|
40 |
+1.8.1.4 |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
Summary: Kernel |
3 | 3 |
Name: linux-esx |
4 | 4 |
Version: 4.4.8 |
5 |
-Release: 5%{?dist} |
|
5 |
+Release: 6%{?dist} |
|
6 | 6 |
License: GPLv2 |
7 | 7 |
URL: http://www.kernel.org/ |
8 | 8 |
Group: System Environment/Kernel |
... | ... |
@@ -27,6 +27,7 @@ Patch11: netfilter-x_tables-deal-with-bogus-nextoffset-values.patch |
27 | 27 |
#fixes CVE-2016-3135 |
28 | 28 |
Patch12: netfilter-x_tables-check-for-size-overflow.patch |
29 | 29 |
Patch13: REVERT-sched-fair-Beef-up-wake_wide.patch |
30 |
+Patch14: e1000e-prevent-div-by-zero-if-TIMINCA-is-zero.patch |
|
30 | 31 |
BuildRequires: bc |
31 | 32 |
BuildRequires: kbd |
32 | 33 |
BuildRequires: kmod |
... | ... |
@@ -75,6 +76,7 @@ The Linux package contains the Linux kernel doc files |
75 | 75 |
%patch11 -p1 |
76 | 76 |
%patch12 -p1 |
77 | 77 |
%patch13 -p1 |
78 |
+%patch14 -p1 |
|
78 | 79 |
|
79 | 80 |
%build |
80 | 81 |
make mrproper |
... | ... |
@@ -140,6 +142,9 @@ ln -sf %{name}-%{version}-%{release}.cfg /boot/photon.cfg |
140 | 140 |
/usr/src/%{name}-headers-%{version}-%{release} |
141 | 141 |
|
142 | 142 |
%changelog |
143 |
+* Fri Jun 17 2016 Alexey Makhalov <amakhalov@vmware.com> 4.4.8-6 |
|
144 |
+- patch: e1000e-prevent-div-by-zero-if-TIMINCA-is-zero.patch |
|
145 |
+- .config: disable rt group scheduling - not supported by systemd |
|
143 | 146 |
* Fri May 27 2016 Alexey Makhalov <amakhalov@vmware.com> 4.4.8-5 |
144 | 147 |
- patch: REVERT-sched-fair-Beef-up-wake_wide.patch |
145 | 148 |
* Wed May 25 2016 Alexey Makhalov <amakhalov@vmware.com> 4.4.8-4 |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
Summary: Kernel |
3 | 3 |
Name: linux |
4 | 4 |
Version: 4.4.8 |
5 |
-Release: 7%{?dist} |
|
5 |
+Release: 8%{?dist} |
|
6 | 6 |
License: GPLv2 |
7 | 7 |
URL: http://www.kernel.org/ |
8 | 8 |
Group: System Environment/Kernel |
... | ... |
@@ -23,6 +23,7 @@ Patch7: netfilter-x_tables-deal-with-bogus-nextoffset-values.patch |
23 | 23 |
#fixes CVE-2016-3135 |
24 | 24 |
Patch8: netfilter-x_tables-check-for-size-overflow.patch |
25 | 25 |
Patch9: REVERT-sched-fair-Beef-up-wake_wide.patch |
26 |
+Patch10: e1000e-prevent-div-by-zero-if-TIMINCA-is-zero.patch |
|
26 | 27 |
BuildRequires: bc |
27 | 28 |
BuildRequires: kbd |
28 | 29 |
BuildRequires: kmod |
... | ... |
@@ -88,6 +89,7 @@ Kernel driver for oprofile, a statistical profiler for Linux systems |
88 | 88 |
%patch7 -p1 |
89 | 89 |
%patch8 -p1 |
90 | 90 |
%patch9 -p1 |
91 |
+%patch10 -p1 |
|
91 | 92 |
|
92 | 93 |
%build |
93 | 94 |
make mrproper |
... | ... |
@@ -184,8 +186,11 @@ ln -s /usr/lib/debug/lib/modules/%{version}/vmlinux-%{version}.debug /boot/vmlin |
184 | 184 |
/lib/modules/%{version}/kernel/arch/x86/oprofile/ |
185 | 185 |
|
186 | 186 |
%changelog |
187 |
-* Wed Jun 15 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 4.4.8-7 |
|
188 |
-- fixed the capitalization for - System.map |
|
187 |
+* Fri Jun 17 2016 Alexey Makhalov <amakhalov@vmware.com> 4.4.8-8 |
|
188 |
+- patch: e1000e-prevent-div-by-zero-if-TIMINCA-is-zero.patch |
|
189 |
+- .config: disable rt group scheduling - not supported by systemd |
|
190 |
+* Wed Jun 15 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 4.4.8-7 |
|
191 |
+- fixed the capitalization for - System.map |
|
189 | 192 |
* Thu May 26 2016 Alexey Makhalov <amakhalov@vmware.com> 4.4.8-6 |
190 | 193 |
- patch: REVERT-sched-fair-Beef-up-wake_wide.patch |
191 | 194 |
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.4.8-5 |