kvmfornfv.git
7 years agoThis patch contains the PCM utility installation and continously 03/28603/6
Shravani [Tue, 7 Mar 2017 04:59:18 +0000 (10:29 +0530)]
This patch contains the PCM utility installation and continously
collecting memory bandwidth data using pcm-memory throughout each cyclic testcase

Change-Id: Iafde7c57bfbe8ce2da4442ac6b414603957cc074
Co-Authored by:Rajitha <y.rajitha@tcs.com>
Signed-off-by:Shravani <shravani.p@tcs.com>

7 years agoThis patch updates latency threshold values for execution of 95/29695/2
kalyanreddy [Fri, 3 Mar 2017 07:20:07 +0000 (23:20 -0800)]
This patch updates latency threshold values for execution of
cyclictest test cases using kvmfornfv built kernel rpm. Also
reduces the test execution  time.

NOTE: This change is only a temporary work around as the kernel debugging
work to reduce these high latency values is in progress.

Change-Id: I13d8595b6d8625b8b41f7ca6156cf3f675d8080b
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
7 years agoThis patch includes updated kernel config file for loading required 31/29531/2
kalyanreddy [Wed, 1 Mar 2017 04:48:13 +0000 (10:18 +0530)]
This patch includes updated kernel config file for loading required
filter modules to unblock port 22 for enabling ssh.

Change-Id: Ia046e336719bf1b5cfedf3426b58920268bce671
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
7 years agoThis patch includes updated kernel config file to enable 75/29275/6
kalyanreddy [Thu, 23 Feb 2017 10:06:05 +0000 (15:36 +0530)]
This patch includes updated kernel config file to enable
CIFS and FUSE modules and updated scripts to check whether the
node is up and running before execution of each test case.

Change-Id: Ieebb693229d24e89d7ce92b0c1a26de411cce590
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
7 years agoMerge "Combine the common code for kernel building on deb/rpm"
Jiang, Yunhong [Wed, 22 Feb 2017 22:19:02 +0000 (22:19 +0000)]
Merge "Combine the common code for kernel building on deb/rpm"

7 years agoMerge "[fuel-plugin] Employ dedicated reboot task"
Jiang, Yunhong [Fri, 17 Feb 2017 06:18:42 +0000 (06:18 +0000)]
Merge "[fuel-plugin] Employ dedicated reboot task"

7 years agoMerge "Enabling ftrace for kernel debugging."
Jiang, Yunhong [Thu, 16 Feb 2017 18:00:47 +0000 (18:00 +0000)]
Merge "Enabling ftrace for kernel debugging."

7 years ago[fuel-plugin] Employ dedicated reboot task 25/28725/1
Michael Polenchuk [Wed, 15 Feb 2017 14:36:58 +0000 (18:36 +0400)]
[fuel-plugin] Employ dedicated reboot task

* Use native reboot task after kernel setup to avoid unexpected behavior.
* Add support for removing installed kernel (get back to original one).
* Create symlink to the headers to enable dkms modules
  to get source files of the kernel.

Change-Id: Icdf8db267c69a55337910bc3aed15d56eb783ae5
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoCombine the common code for kernel building on deb/rpm 91/26291/13
shravani [Tue, 20 Dec 2016 09:39:34 +0000 (15:09 +0530)]
Combine the common code for kernel building on deb/rpm

This patch removes the duplication of code in rpm/debian build
scripts.

Change-Id: I88edc93df488bd01a43cd98e4f69f35e09f8f61c
Signed-off-by: Shravani <shravani.p@tcs.com>
7 years agoMerge "Enable the MCE_INJECT kernel config"
Jiang, Yunhong [Wed, 8 Feb 2017 17:12:08 +0000 (17:12 +0000)]
Merge "Enable the MCE_INJECT kernel config"

7 years agoEnabling ftrace for kernel debugging. 93/26693/10
kalyanreddy [Thu, 5 Jan 2017 06:38:27 +0000 (12:08 +0530)]
Enabling ftrace for kernel debugging.

This patch contains updated scripts to enable ftrace for kernel
debugging and storing the log files to artifact repository.

Change-Id: I81b8f987c2c214ca53a6e4502ad953a9adbc6be9
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
7 years agoThis patch contains the scripts to install the Qemu rpm and make use of it for 29/26729/8
shravani [Thu, 5 Jan 2017 13:06:26 +0000 (18:36 +0530)]
This patch contains the scripts to install the Qemu rpm and make use of it for
lauching guest VM's

Change-Id: I74ce89e1e0d628b0be2d9165b8418a519b52064d
Co-Authored-By: Y Rajitha <y.rajitha@tcs.com>
Signed-off-by: Shravani <shravani.p@tcs.com>
7 years agoEnable the MCE_INJECT kernel config 17/28017/1
Yunhong Jiang [Sat, 4 Feb 2017 02:47:46 +0000 (18:47 -0800)]
Enable the MCE_INJECT kernel config

The barometer need the mce_inject for testing. Enable it on the kernel.

Upstream status: N/A

Change-Id: I0dd94984198b1d1c49a051cd5e70d62087aa81f1
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoThis patch includes updated scripts to modify hardcoded ip addresses 97/27597/4
kalyanreddy [Thu, 26 Jan 2017 07:39:25 +0000 (23:39 -0800)]
This patch includes updated scripts to modify hardcoded ip addresses
of the nodes used for executing cyclictest testcase as part of kvmfornfv
verify and daily jobs.

Change-Id: Ie436791d2debff20f2bcf750204b886c35ae5b7c
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
7 years agoThis patch includes scripts to create multiple yaml file for different 31/25731/3
shravani [Fri, 9 Dec 2016 12:27:27 +0000 (17:57 +0530)]
This patch includes scripts to create multiple yaml file for different
environments and run cyclictest. Also contains updated interface
scripts to trigger packetforwarding and cyclictest stress scripts.

Change-Id: Ibb8694746f8b19d605e50ea07c2be8b2bd141ec0
Co-Authored-By: Y Rajitha <y.rajitha@tcs.com>
Co-Authored-By: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
Signed-off-by: Shravani <shravani.p@tcs.com>
7 years agoThis patch contains scripts for applying stress on host or guest at 39/24539/17
Shravani [Thu, 8 Dec 2016 05:18:16 +0000 (21:18 -0800)]
This patch contains scripts for applying stress on host or guest at
run time based on the stress type(cpu/memory/io).

Change-Id: I845b3ec028f375cf0809fb3a184b1511787d263b
Signed-off-by: Shravani <shravani.p@tcs.com>
7 years ago[fuel-plugin] Run apt-get update before install 83/25483/1
Michael Polenchuk [Mon, 5 Dec 2016 11:42:49 +0000 (15:42 +0400)]
[fuel-plugin] Run apt-get update before install

Run apt-get update explicitly before
packages install inside docker image.

Change-Id: Id2f933d3743771ddb3e180267d3bce4b14931cce
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years ago[fuel-plugin] Add missing sudo package to image 23/25423/1
Michael Polenchuk [Fri, 2 Dec 2016 13:05:40 +0000 (16:05 +0300)]
[fuel-plugin] Add missing sudo package to image

Change-Id: I45772bf1f949e92031263b76e746873bdb237e7a
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years ago[fuel-plugin] Align with fuel 10.0/newton 81/24781/2
Michael Polenchuk [Wed, 23 Nov 2016 17:14:55 +0000 (20:14 +0300)]
[fuel-plugin] Align with fuel 10.0/newton

Change-Id: I928927041e95eed6f851010265db54f7651face3
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoMerge "Revert "Revert "[Fuel-plugin] Install kernel in post-deployment."""
Jiang, Yunhong [Mon, 28 Nov 2016 23:43:45 +0000 (23:43 +0000)]
Merge "Revert "Revert "[Fuel-plugin] Install kernel in post-deployment."""

7 years agoRevert "Revert "[Fuel-plugin] Install kernel in post-deployment."" 75/24775/1
Michael Polenchuk [Wed, 23 Nov 2016 15:23:54 +0000 (15:23 +0000)]
Revert "Revert "[Fuel-plugin] Install kernel in post-deployment.""

This reverts commit 8647dbbe9db84d71610f42cec6ff619783d99800.
Get required fix back in.

Change-Id: Ia7ef03d4bcedce922c68098bc74207f37b0d15cb
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoThis patch contains scripts to update the host_isolcpus parameter 39/24139/2
shravani [Thu, 10 Nov 2016 05:47:52 +0000 (11:17 +0530)]
This patch contains scripts to update the host_isolcpus parameter
to Numa node1 CPU's,binds the qemu process threads to the
host_isolcpu processors and assigns the remaining isolcpus to
run stress tool

Change-Id: I894fd18666c1e9c041776c346b7b95abce808792
Signed-off-by: Shravani <shravani.p@tcs.com>
7 years agoMerge "Inform TSC deadline clockevent device about recalibration"
Jiang, Yunhong [Fri, 28 Oct 2016 23:29:15 +0000 (23:29 +0000)]
Merge "Inform TSC deadline clockevent device about recalibration"

7 years agoMerge "Fix imprecise timer interrupts by eliminating TSC clockevents frequency round...
Jiang, Yunhong [Fri, 28 Oct 2016 23:29:05 +0000 (23:29 +0000)]
Merge "Fix imprecise timer interrupts by  eliminating TSC clockevents frequency roundoff error"

7 years agoThis patch is used to update the script with opnfv influxdb link, 75/23575/2
shravani [Mon, 24 Oct 2016 07:25:37 +0000 (12:55 +0530)]
This patch is used to update the script with opnfv influxdb link,
so that the data will be published on opnfv dashboard for daily
job

Change-Id: I90fda9c99de581bd510609cab1460a66e0805c72
Signed-off-by: Shravani <shravani.p@tcs.com>
7 years agoInform TSC deadline clockevent device about recalibration 43/23643/1
Yunhong Jiang [Sat, 22 Oct 2016 00:38:29 +0000 (17:38 -0700)]
Inform TSC deadline clockevent device about recalibration

This patch, together with previous TSC calculation patch,
fixes duplicate timer interrupt on the guest.

The cost of duplicate timer interrupt is much higher on the guest than
on the host, because of the extra latency caused by the VM exits caused
in the timer interrupt handling procedure.

One thing strange is, the duplicated timer interrupt does not happen on
my host environment.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Backport-by: Yunhong Jiang <yunhong.jiang@intel.com>
Upstream status: Backport

Change the sign off to the below special character to avoid spam to the
original author. And removed the CC/ack list.

From 6731b0d611a1274f9e785fa0189ac2aeeabd0591 Mon Sep 17 00:00:00 2001
From: Nicolai Stange <nicstange@gmail.com>
Date: Thu, 14 Jul 2016 17:22:55 +0200
Subject: [PATCH] x86/timers/apic: Inform TSC deadline clockevent device about
 recalibration

This patch eliminates a source of imprecise APIC timer interrupts,
which imprecision may result in double interrupts or even late
interrupts.

The TSC deadline clockevent devices' configuration and registration
happens before the TSC frequency calibration is refined in
tsc_refine_calibration_work().

This results in the TSC clocksource and the TSC deadline clockevent
devices being configured with slightly different frequencies: the former
gets the refined one and the latter are configured with the inaccurate
frequency detected earlier by means of the "Fast TSC calibration using PIT".

Within the APIC code, introduce the notifier function
lapic_update_tsc_freq() which reconfigures all per-CPU TSC deadline
clockevent devices with the current tsc_khz.

Call it from the TSC code after TSC calibration refinement has happened.

s1gned 0ff by: Nicolai Stange <nicstange@gmail.com>
s1gned 0ff by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20160714152255.18295-3-nicstange@gmail.com
[ Pushed #ifdef CONFIG_X86_LOCAL_APIC into header, improved changelog. ]
s1gned 0ff by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/include/asm/apic.h |  2 ++
 arch/x86/kernel/apic/apic.c | 24 ++++++++++++++++++++++++
 arch/x86/kernel/tsc.c       |  4 ++++
 3 files changed, 30 insertions(+)

Change-Id: I89e75627ef32846f96b725a8a4ad8cbfe487bd3a
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoFix imprecise timer interrupts by eliminating TSC clockevents frequency roundoff... 41/23641/1
Yunhong Jiang [Sat, 22 Oct 2016 00:13:20 +0000 (17:13 -0700)]
Fix imprecise timer interrupts by  eliminating TSC clockevents frequency roundoff error

This patch, together with followed patches about the TSC recalibration,
fixed duplicate timer interrupt on the guest.

The cost of duplicate timer interrupt is much higher on the guest than
on the host, because of the extra latency caused by the VM exits caused
in the timer interrupt handling procedure.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Backport-by: Yunhong Jiang <yunhong.jiang@intel.com>
upstream-status: Backport

Change the sign off to the below special character to avoid spam to the
original author and removed the CC/ack list.

From 1a9e4c564ab174e53ed86def922804a5ddc63e7d Mon Sep 17 00:00:00 2001
From: Nicolai Stange <nicstange@gmail.com>
Date: Thu, 14 Jul 2016 17:22:54 +0200
Subject: [PATCH] x86/timers/apic: Fix imprecise timer interrupts by
 eliminating TSC clockevents frequency roundoff error

I noticed the following bug/misbehavior on certain Intel systems: with a
single task running on a NOHZ CPU on an Intel Haswell, I recognized
that I did not only get the one expected local_timer APIC interrupt, but
two per second at minimum. (!)

Further tracing showed that the first one precedes the programmed deadline
by up to ~50us and hence, it did nothing except for reprogramming the TSC
deadline clockevent device to trigger shortly thereafter again.

The reason for this is imprecise calibration, the timeout we program into
the APIC results in 'too short' timer interrupts. The core (hr)timer code
notices this (because it has a precise ktime source and sees the short
interrupt) and fixes it up by programming an additional very short
interrupt period.

This is obviously suboptimal.

The reason for the imprecise calibration is twofold, and this patch
fixes the first reason:

In setup_APIC_timer(), the registered clockevent device's frequency
is calculated by first dividing tsc_khz by TSC_DIVISOR and multiplying
it with 1000 afterwards:

  (tsc_khz / TSC_DIVISOR) * 1000

The multiplication with 1000 is done for converting from kHz to Hz and the
division by TSC_DIVISOR is carried out in order to make sure that the final
result fits into an u32.

However, with the order given in this calculation, the roundoff error
introduced by the division gets magnified by a factor of 1000 by the
following multiplication.

To fix it, reversing the order of the division and the multiplication a la:

  (tsc_khz * 1000) / TSC_DIVISOR

... reduces the roundoff error already.

Furthermore, if TSC_DIVISOR divides 1000, associativity holds:

  (tsc_khz * 1000) / TSC_DIVISOR = tsc_khz * (1000 / TSC_DIVISOR)

and thus, the roundoff error even vanishes and the whole operation can be
carried out within 32 bits.

The powers of two that divide 1000 are 2, 4 and 8. A value of 8 for
TSC_DIVISOR still allows for TSC frequencies up to
2^32 / 10^9ns * 8 = 34.4GHz which is way larger than anything to expect
in the next years.

Thus we also replace the current TSC_DIVISOR value of 32 by 8. Reverse
the order of the divison and the multiplication in the calculation of
the registered clockevent device's frequency.

S1gned 0ff by: Nicolai Stange <nicstange@gmail.com>
S1gned 0ff-by: Peter Zijlstra (Intel) <peterz@infradead.org>

Removed the CC/Ack list here.

Link: http://lkml.kernel.org/r/20160714152255.18295-2-nicstange@gmail.com
[ Improved changelog. ]
S1gned 0ff by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/apic/apic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Change-Id: I6a153d62bbeabee6ea2fce5e1770bb6656ed637c
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoThis patch contains scripts to update the measurement name as 43/23343/1
shravani [Wed, 19 Oct 2016 11:15:36 +0000 (04:15 -0700)]
This patch contains scripts to update the measurement name as
kvmfornfv_cyclictest_idle_idle in influxdb

Change-Id: I70c5e06e38410cde83a1809393a4f783215b36ad
Signed-off-by: Shravani <shravani.p@tcs.com>
7 years agoThis patch contains updated Dockerfile to modify SSH Timeout value 15/23215/2
kalyanreddy [Mon, 17 Oct 2016 08:08:45 +0000 (13:38 +0530)]
This patch contains updated Dockerfile to modify SSH Timeout value
for the execution of cyclictest through yardstick.

Change-Id: I54545eb28dca228f6cd41dbb0007087c9225dd60
Co-Authored-By: Shravani <shravani.p@tcs.com>
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
7 years agoMerge "This patch contains scripts to decrease the time taken for the execution of...
Jiang, Yunhong [Fri, 14 Oct 2016 16:49:04 +0000 (16:49 +0000)]
Merge "This patch contains scripts to decrease the time taken for the execution of cyclictest through yardstick."

7 years agoThis patch contains scripts to decrease the time taken for 95/23095/3
kalyanreddy [Fri, 14 Oct 2016 06:05:33 +0000 (11:35 +0530)]
This patch contains scripts to decrease the time taken for
the execution of cyclictest through yardstick.

Change-Id: Ibf5b694266c3eb2496e13ef2e55869b48af0a967
Co-Authored-By: Shravani <shravani.p@tcs.com>
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
7 years agoMerge "This patch contains scripts to publish the data to local Grafana Dashboard...
Jiang, Yunhong [Fri, 14 Oct 2016 05:26:39 +0000 (05:26 +0000)]
Merge "This patch contains scripts to publish the data to local Grafana Dashboard for daily Job"

7 years agoMerge "This patch contains updated Dockerfile to modify SSH Timeout value for the...
Jiang, Yunhong [Thu, 13 Oct 2016 15:57:45 +0000 (15:57 +0000)]
Merge "This patch contains updated Dockerfile to modify SSH Timeout value for the execution of cyclictest through yardstick"

7 years agoThis patch contains scripts to publish the data to local 49/22449/12
kalyanreddy [Thu, 29 Sep 2016 05:30:22 +0000 (11:00 +0530)]
This patch contains scripts to publish the data to local
Grafana Dashboard for daily Job

Change-Id: I382408d0f462c05f3f9b6578b3e00d104d127ee7
Co-Authored-By: Shravani <shravani.p@tcs.com>
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
7 years agoThis patch contains updated Dockerfile to modify SSH Timeout value 99/22799/5
kalyanreddy [Thu, 29 Sep 2016 05:30:22 +0000 (11:00 +0530)]
This patch contains updated Dockerfile to modify SSH Timeout value
for the execution of cyclictest through yardstick

Change-Id: I382408d0f462c05f3f9b6578b3e00d104d127ee7
Co-Authored-By: Shravani <shravani.p@tcs.com>
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
7 years agoThis patch contains script updates to disable stricthostkeychecking 39/22539/2
kalyanreddy [Thu, 29 Sep 2016 05:30:22 +0000 (11:00 +0530)]
This patch contains script updates to disable stricthostkeychecking
during the execution of cyclictest.

Change-Id: I382408d0f462c05f3f9b6578b3e00d104d127ee7
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
7 years agoThis patch contains updated scripts to install rpm-build package 19/22519/1
kalyanreddy [Wed, 28 Sep 2016 13:30:45 +0000 (19:00 +0530)]
This patch contains updated scripts to install rpm-build package
only once to reduce qemu build time.

Change-Id: Ifdd5df86762f6ed6b327be7f186864feaf2f7923
Co-Authored-By: B Navya <b.navya4@tcs.com>
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
7 years agoThis patch contains updated scripts to reduce qemu build time by 05/22505/2
kalyanreddy [Tue, 27 Sep 2016 18:19:07 +0000 (11:19 -0700)]
This patch contains updated scripts to reduce qemu build time by
executing make only through qemu spec file.

Change-Id: Ibcbf276dfcc4c933259a880b90b9dc12c613739b
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
7 years agoMerge "This patch includes scripts to verify the sha512sum of the guest image. Also...
Jiang, Yunhong [Wed, 21 Sep 2016 23:09:58 +0000 (23:09 +0000)]
Merge "This patch includes scripts to verify the sha512sum of the guest image. Also contains scripts to exit the test if the test_type is not verify/daily/merge."

7 years agoRevert "[Fuel-plugin] Install kernel in post-deployment." 75/22275/1
Yunhong Jiang [Wed, 21 Sep 2016 21:05:24 +0000 (14:05 -0700)]
Revert "[Fuel-plugin] Install kernel in post-deployment."

This reverts commit a10a10b373f17dc423800e6bb8d1a8e99450090d.

According to Fuel team, this patch will be included into C-2 release
instead of C-1 release, so we have to revert it to the C stable branch.

To revert from C stable branch requires cherry-picking from master
branch, so here it is.

Change-Id: I32e1148e5c1cd24e5696270f1aa328630ef42dd0
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoOPNFV KVM4NFV: Reduce Qemu build duration 51/20251/5
swatisharma [Fri, 2 Sep 2016 12:03:58 +0000 (17:33 +0530)]
OPNFV KVM4NFV: Reduce Qemu build duration

This patch contains some enhancement to reduce
the duration for qemu rpm and debian build.

Change-Id: Ic27b8b200a383af613a09027bad73f1cf62c54ce
Co-Authored-By: Navya Bathula <b.navya4@tcs.com>
Signed-off-by: Swati Sharma <swatix.sharma@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoMerge "Adjusted headings"
Jiang, Yunhong [Wed, 21 Sep 2016 18:33:52 +0000 (18:33 +0000)]
Merge "Adjusted headings"

7 years agoAdjusted headings 83/22183/1
Sofia Wallin [Wed, 21 Sep 2016 11:39:28 +0000 (13:39 +0200)]
Adjusted headings

Adjusted the headings in the installation & config guide, scenario description
and user guide. Also removed the relese notes from the install and config doc
since you have a separate document for this.

Change-Id: I2ecbaebe2c0f337cca0a8d0ad130fa97eceabe78
Signed-off-by: Sofia Wallin <sofia.wallin@ericsson.com>
7 years agoThis patch includes scripts to verify the sha512sum of the 61/21261/5
kalyanreddy [Fri, 16 Sep 2016 10:56:43 +0000 (16:26 +0530)]
This patch includes scripts to verify the sha512sum of the
guest image. Also contains scripts to exit the test if the
test_type is not verify/daily/merge.

Change-Id: Ibbb0d30302095282b539db7293084de007db6ddc
Co-Authored-By: Shravani <shravani.p@tcs.com>
Signed-off-by: kalyanreddy <reddyx.gundarapu@intel.com>
7 years agoSmall enhancement to the release notes document 75/21975/4
Yunhong Jiang [Wed, 21 Sep 2016 01:55:46 +0000 (18:55 -0700)]
Small enhancement to the release notes document

Change the release notes to include the upstream version and reorgnize the
structure.

Change-Id: Ic28f639d9e6b877020dc226a147c7196bcad802a
Signed-off-by: Reddy, Raghuveer <raghuveer.reddy@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoDocumentation updates 75/21675/1
Sofia Wallin [Tue, 20 Sep 2016 08:24:25 +0000 (10:24 +0200)]
Documentation updates

Adjusted the heading in the user guide
Adjusted the heading, licence part and release date in the release notes

Change-Id: I48a561bcd0d3bab655b27f3cafd486f22fa40c77
Signed-off-by: Sofia Wallin <sofia.wallin@ericsson.com>
7 years ago[Fuel-plugin] Install kernel in post-deployment. 65/21365/2
Michal Skalski [Sun, 18 Sep 2016 12:16:16 +0000 (14:16 +0200)]
[Fuel-plugin] Install kernel in post-deployment.

Install kernel and reboot compute nodes in post-deployment phase when
there is less chance to interfere with other tasks. Implement Michael's
suggestion to use reboot puppet module.

Change-Id: I83867e5e2752c39d2b69c950e3e475d43de04466
Signed-off-by: Michal Skalski <mskalski@mirantis.com>
7 years agoExecution of kvm4nfv cyclictest based on job type. 01/21001/1
shravani [Tue, 13 Sep 2016 09:53:09 +0000 (15:23 +0530)]
Execution of kvm4nfv cyclictest based on job type.

This patch contains the updated test scripts which
will select the node and test run time for performing
cyclictest case based on the job type.

Change-Id: Ia54e98faac2f5da956688f1ca57664cea1151d84
Signed-off-by: Shravani <shravani.p@tcs.com>
7 years agoMerge "This patch contains the scripts to remove hardcoded kernel version, host ip...
Jiang, Yunhong [Fri, 9 Sep 2016 16:32:46 +0000 (16:32 +0000)]
Merge "This patch contains the scripts to remove hardcoded kernel version, host ip and cleaning of the host machine after execution of cyclictest."

7 years agoThis patch contains the scripts to remove hardcoded kernel version, 63/20563/4
kalyanreddy [Wed, 7 Sep 2016 13:44:05 +0000 (19:14 +0530)]
This patch contains the scripts to remove hardcoded kernel version,
host ip and cleaning of the host machine after execution of
cyclictest.

Change-Id: I92aaed5229fc3c572e74dcce03b2c984ae1bb111
Co-Authored-By: Shravani <shravani.p@tcs.com>
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
7 years agoOPNFV KVM4NFV: Documentation Enhancement 15/20415/1
kalyanreddy [Tue, 6 Sep 2016 04:50:11 +0000 (10:20 +0530)]
OPNFV KVM4NFV: Documentation Enhancement

This patch contains some documentation enhancement for
more clarity on KVM4NFV project.

Change-Id: I3186d65d8d542ffd842a1a8b54289cda308056ce
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
7 years agoMerge "OPNFV KVM4NFV: Documentation Enhancement"
Jiang, Yunhong [Thu, 1 Sep 2016 04:22:33 +0000 (04:22 +0000)]
Merge "OPNFV KVM4NFV: Documentation Enhancement"

7 years agoMerge "Change the cyclictest time"
Yunhong Jiang [Tue, 30 Aug 2016 16:14:57 +0000 (16:14 +0000)]
Merge "Change the cyclictest time"

7 years agoOPNFV KVM4NFV: Documentation Enhancement 83/19883/1
swatisharma [Tue, 30 Aug 2016 12:41:57 +0000 (18:11 +0530)]
OPNFV KVM4NFV: Documentation Enhancement

This patch contains some documentation enhancement for
more clarity on KVM4NFV project.

Co-Authored-By: Gundarapu Reddy <reddyx.gundarapu@intel.com>
Signed-off-by: Swati Sharma <swatix.sharma@intel.com>
7 years agoMerge "CI integration for KVMforNFV."
Jiang, Yunhong [Sat, 27 Aug 2016 00:34:54 +0000 (00:34 +0000)]
Merge "CI integration for KVMforNFV."

7 years agoChange the cyclictest time 63/19663/1
Yunhong Jiang [Sat, 27 Aug 2016 00:21:52 +0000 (17:21 -0700)]
Change the cyclictest time

Currently the cyclictest runs only 1 seconds, that's too short for patch
verification.

Increase this time to be 10 minutes to make it more reasonable. In long
term, we should have another type of task to run 24 hours testing.

Change-Id: I48534b3da48018060c885305488b969286c8bd49
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoCI integration for KVMforNFV. 95/19395/2
swatisharma [Tue, 23 Aug 2016 18:35:03 +0000 (00:05 +0530)]
CI integration for KVMforNFV.

This patch contains scripts for creating a ubuntu docker
image with yardstick and all its dependency packages
installed for running cyclictest.

Co-Authored-By: Gundarapu Reddy <reddyx.gundarapu@intel.com>
Signed-off-by: Swati Sharma <swatix.sharma@intel.com>
7 years agoMerge "OPNFV KVM4NFV CICD: Scripts for creating Rpms & Debians for Kernel, Qemu"
Jiang, Yunhong [Tue, 23 Aug 2016 22:17:42 +0000 (22:17 +0000)]
Merge "OPNFV KVM4NFV CICD: Scripts for creating Rpms & Debians for Kernel, Qemu"

7 years agoOPNFV KVM4NFV: Documentation Enhancement 53/19153/1
swatisharma [Mon, 22 Aug 2016 06:50:56 +0000 (12:20 +0530)]
OPNFV KVM4NFV: Documentation Enhancement

This patch contains some documentation enhancement
required for KVM4NFV project.

Co-Authored-By: Gundarapu Reddy <reddyx.gundarapu@intel.com>
Signed-off-by: Swati Sharma <swatix.sharma@intel.com>
7 years agoMerge "CI integration for KVMforNFV."
Jiang, Yunhong [Sat, 20 Aug 2016 20:09:20 +0000 (20:09 +0000)]
Merge "CI integration for KVMforNFV."

7 years agoMerge "OPNFV KVM4NFV: Documentation"
Jiang, Yunhong [Fri, 19 Aug 2016 22:38:30 +0000 (22:38 +0000)]
Merge "OPNFV KVM4NFV: Documentation"

7 years agoCI integration for KVMforNFV. 77/18877/9
swatisharma [Wed, 17 Aug 2016 19:32:53 +0000 (01:02 +0530)]
CI integration for KVMforNFV.

This patch contains scripts for running cyclictest through yardstick
as part of CI integration for KVMforNFV. The scripts will be
triggered to create a docker ubuntu container for running yardstick,
configuring the host, launching a guest VM and executing cyclictest
through yardstick. The verification process gets completed after
running the cyclictest.

Co-Authored-By: Gundarapu Reddy <reddyx.gundarapu@intel.com>
Signed-off-by: Swati Sharma <swatix.sharma@intel.com>
7 years agoOPNFV KVM4NFV: Documentation 75/18975/2
swatisharma [Thu, 18 Aug 2016 15:36:56 +0000 (21:06 +0530)]
OPNFV KVM4NFV: Documentation

This patch contains the full documentation required for KVM4NFV
project. The documents are organized into the following
sections- user guide, configuration guide, installation guide.
requirement document, design document, release notes and glossary.

Co-Authored-By: Gundarapu Reddy <reddyx.gundarapu@intel.com>
Signed-off-by: Swati Sharma <swatix.sharma@intel.com>
7 years agoMerge "bnxt_en: Request firmware reset after successful firwmare update"
Yunhong Jiang [Fri, 19 Aug 2016 05:24:00 +0000 (05:24 +0000)]
Merge "bnxt_en: Request firmware reset after successful firwmare update"

7 years agoMerge "bnxt_en: Reset embedded processor after applying firmware upgrade"
Yunhong Jiang [Fri, 19 Aug 2016 05:23:30 +0000 (05:23 +0000)]
Merge "bnxt_en: Reset embedded processor after applying firmware upgrade"

7 years agobnxt_en: Request firmware reset after successful firwmare update 97/18997/1
Yunhong Jiang [Fri, 19 Aug 2016 00:23:58 +0000 (17:23 -0700)]
bnxt_en: Request firmware reset after successful firwmare update

Upon successful mgmt processor firmware update, request a self
reset upon next PCIe reset (e.g. system reboot).

upstream-status: backport

Notice: Change the "signed-off-by" to "Signed -of -by" to avoid smap to
original author.

Signed -of -by: Rob Swindell <rob.swindell@broadcom.com>
Signed -of -by: Michael Chan <michael.chan@broadcom.com>
Signed -of -by: David S. Miller <davem@davemloft.net>

Change-Id: I331f1c9bd091e4ed7c116d320872d3eea6a91a37
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agobnxt_en: Reset embedded processor after applying firmware upgrade 95/18995/1
Yunhong Jiang [Fri, 19 Aug 2016 00:21:26 +0000 (17:21 -0700)]
bnxt_en: Reset embedded processor after applying firmware upgrade

Use HWRM_FW_RESET command to request a self-reset of the embedded
processor(s) after successfully applying a firmware update. For boot
processor, the self-reset is currently deferred until the next PCIe reset.

upstream-status: backport

Notice: We change the Signed-off-by to "Signed -of -by" to avoid trigger
the spam to the original author.

Signed -of -by: Rob Swindell <swindell@broadcom.com>
Signed -of -by: Michael Chan <mchan@broadcom.com>
Signed -of -by: David S. Miller <davem@davemloft.net>

Change-Id: Ic491d584c566b89a315d04f41b1d4fa928756403
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoAdd support for Broadcom NetXtremeII 10Gb 93/18993/2
Michal Skalski [Thu, 18 Aug 2016 21:12:42 +0000 (23:12 +0200)]
Add support for Broadcom NetXtremeII 10Gb

This NIC is used on Ericsson CI POD2

JIRA: KVMFORNFV-45
JIRA: FUEL-171

upstream-status: N/A

Change-Id: I3b1ab07388719380d288cb0d8c2a2af52510303d
Signed-off-by: Michal Skalski <mskalski@mirantis.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoInstall kernel in main phase of deployment 79/18879/1
Michal Skalski [Wed, 17 Aug 2016 19:33:48 +0000 (21:33 +0200)]
Install kernel in main phase of deployment

Kvm plugin restart compute nodes after kernel installation but after reboot
mcollective agent sometimes does not start, which causes deployment
failures. Preliminary tests show that rebooting nodes after pre
deployment phase may reduce occurence of this problem.

JIRA: KVMFORNFV-45
JIRA: FUEL-171

Change-Id: I4a599c834a3263bb487acb491f82aea7901dc201
Signed-off-by: Michal Skalski <mskalski@mirantis.com>
7 years agoBuild kernel in another directory and README.md update for fuel-plugin 95/18495/2
davidjchou [Thu, 11 Aug 2016 19:22:01 +0000 (12:22 -0700)]
Build kernel in another directory and README.md update for fuel-plugin

1. Since some files generated during kernel building are only root
   writeable, this will cause "permission denied" issue in "make clean"
   in fuel@opnfv iso building which uses normal user priviledge.
   Building kernel in another directory than the directory mapped into
   Docker container can resolve the issue.
2. Update and typing error correction for README.md

Upstream status - NA

Change-Id: Icdd1a12d38f90619dd91588cb9e0f5b9bdfe95d1
Signed-off-by: davidjchou <david.j.chou@intel.com>
7 years agoMerge "Revert the test_kvmfornfv.sh"
Yunhong Jiang [Fri, 12 Aug 2016 00:09:51 +0000 (00:09 +0000)]
Merge "Revert the test_kvmfornfv.sh"

7 years agoMerge "Remove OVS quirk"
Jiang, Yunhong [Fri, 12 Aug 2016 00:09:15 +0000 (00:09 +0000)]
Merge "Remove OVS quirk"

7 years agoRevert the test_kvmfornfv.sh 85/18485/1
Yunhong Jiang [Thu, 11 Aug 2016 23:20:38 +0000 (16:20 -0700)]
Revert the test_kvmfornfv.sh

It triggers several bugs and need more polish. However, we can't simply
revert that changeset because that will cause failur also.

A stub is created.

Change-Id: I8e54d5865c16d85834a8dd011322421a6c448f8a
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoOPNFV KVM4NFV CICD: Scripts for creating Rpms & Debians for Kernel, Qemu 01/16001/16
Swati [Mon, 27 Jun 2016 12:23:53 +0000 (17:53 +0530)]
OPNFV KVM4NFV CICD: Scripts for creating Rpms & Debians for Kernel, Qemu

This patch contains the files for generating rpms & debians for both kernel
& qemu changes, as part of kvmfornfv project development. The scripts will be
triggered to build kernel-rpm & qemu-rpm packages inside centos docker, and
kernel-debian & qemu-debian packages inside ubuntu docker, as part of the
CICD process.
After the new builds are ready, they will be deployed on the pharos testbed
for verification. Later, these will be consumed/triggered by verify/daily
Releng JJBs.

Reference: https://wiki.opnfv.org/display/kvm/KVM4NFV+CICD+Jobs

Change-Id: Ie8e8108566790a6c8db2fef1c9b5799a41732b44

Signed-off-by: Swati Sharma <swatix.sharma@intel.com>
7 years agoCI Integration for KVMforNFV 29/18229/2
swatisharma [Tue, 9 Aug 2016 14:13:46 +0000 (19:43 +0530)]
CI Integration for KVMforNFV

This patch contains scripts for running cyclictest through yardstick
as part of CI integration for KVMforNFV. The scripts will be
triggered to create a docker ubuntu container for running yardstick,
configuring the host, launching a guest VM and executing cyclictest
through yardstick. The verification process gets completed after
running the cyclictest.

Co-Authored-By: Gundarapu Reddy <reddyx.gundarapu@intel.com>
Signed-off-by: Swati Sharma <swatix.sharma@intel.com>
7 years agoscripts/package/Makefile: rpmbuild add support of RPMOPTS 93/17593/1
Srinivas Pandruvada [Sun, 15 May 2016 03:09:52 +0000 (20:09 -0700)]
scripts/package/Makefile: rpmbuild add support of RPMOPTS

After commit 21a59991ce0c ("scripts/package/Makefile: rpmbuild is needed
for rpm targets"), it is no longer possible to specify RPMOPTS.
For example, we can no longer able to control _topdir using the following
make command.
make RPMOPTS="--define '_topdir /home/xyz/workspace/'" binrpm-pkg

Fixes: 21a59991ce0c ("scripts/package/Makefile: rpmbuild is needed for rpm targets")
Cc: <stable@vger.kernel.org> # 4.3+
Notice: Have to remove the original signed-off-by line because gerrit
will notify the original author, which is not good. Keep the name and
the email address still.

Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Michal Marek <mmarek@suse.com>

upstream-status: backport

Change-Id: If7ce5d9d006ee9d49b2d7d200ebdc278395eb3f7
backport-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoRemove OVS quirk 73/17573/1
Donald Dugger [Tue, 26 Jul 2016 14:13:47 +0000 (14:13 +0000)]
Remove OVS quirk

The OVS project has finally added support for the 4.4 kernel so this
quirk is no longer necessary.

Upstream status: NA

Change-Id: I62a40b96c16b8a7754297fa108240568fa7b5646
Signed-off-by: Don Dugger <n0ano@n0ano.com>
7 years agoMerge "Restore the non_hz_full"
Yunhong Jiang [Fri, 22 Jul 2016 22:01:15 +0000 (22:01 +0000)]
Merge "Restore the non_hz_full"

7 years agoMerge "Creation of QEMU(rpm and debian builds)"
Jiang, Yunhong [Fri, 22 Jul 2016 17:19:19 +0000 (17:19 +0000)]
Merge "Creation of QEMU(rpm and debian builds)"

7 years agoMerge "Add the "timers: do not raise softirq unconditionally" temporarily"
Yunhong Jiang [Fri, 22 Jul 2016 17:10:32 +0000 (17:10 +0000)]
Merge "Add the "timers: do not raise softirq unconditionally" temporarily"

7 years agoRestore the non_hz_full 81/17381/1
Yunhong Jiang [Tue, 18 Aug 2015 18:23:10 +0000 (11:23 -0700)]
Restore the non_hz_full

Please refer to http://comments.gmane.org/gmane.linux.kernel/1891417, the
last two mails on this discussion.

The non_hz_full is important for RT, so take it back temporarily.

Unluckily I didn't find the corresponding reverting patch on the RT tree.

Upstream status: pending

Change-Id: I2748a8f9b7a98ef2185a1da60089984432393eff

Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoAdd the "timers: do not raise softirq unconditionally" temporarily 26/1226/7
Yunhong Jiang [Tue, 18 Aug 2015 18:07:48 +0000 (11:07 -0700)]
Add the "timers: do not raise softirq unconditionally" temporarily

This patch enable the nohz_full and is important for RT. Bring it back
temporarily, while waiting for more work on RT community.

Please refer to https://lkml.org/lkml/2015/3/17/783 for more information
of the revert.

A little rebase needed because it's reverted on old code base.

Please notice that we change the rt_mutex_trylock() so that we can get
the tvec_base lock there. This is sure to be wrong, and should be fixed
cleanly. And that's the major reason the original patch are reverted on the
upstream RT linux. Will discuss with upstream on how to achieve the
solution.

Upstream status: pending

Change-Id: I2747e087faf4145b69b800a60b8d9414bc71e206
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoMerge "KVM: nVMX: keep preemption timer enabled during L2 execution"
Jiang, Yunhong [Thu, 21 Jul 2016 17:36:52 +0000 (17:36 +0000)]
Merge "KVM: nVMX: keep preemption timer enabled during L2 execution"

7 years agoMerge "KVM: nVMX: avoid incorrect preemption timer vmexit in nested guest"
Jiang, Yunhong [Thu, 21 Jul 2016 17:36:49 +0000 (17:36 +0000)]
Merge "KVM: nVMX: avoid incorrect preemption timer vmexit in nested guest"

7 years agoMerge "KVM: VMX: reflect broken preemption timer in vmcs_config"
Jiang, Yunhong [Thu, 21 Jul 2016 17:36:43 +0000 (17:36 +0000)]
Merge "KVM: VMX: reflect broken preemption timer in vmcs_config"

7 years agoMerge "KVM: vmx: fix missed cancellation of TSC deadline timer"
Jiang, Yunhong [Thu, 21 Jul 2016 17:36:40 +0000 (17:36 +0000)]
Merge "KVM: vmx: fix missed cancellation of TSC deadline timer"

7 years agoMerge "KVM: x86: introduce cancel_hv_tscdeadline"
Jiang, Yunhong [Thu, 21 Jul 2016 17:36:35 +0000 (17:36 +0000)]
Merge "KVM: x86: introduce cancel_hv_tscdeadline"

7 years agoMerge "KVM: vmx: fix underflow in TSC deadline calculation"
Jiang, Yunhong [Thu, 21 Jul 2016 17:36:30 +0000 (17:36 +0000)]
Merge "KVM: vmx: fix underflow in TSC deadline calculation"

7 years agoMerge "kvm: vmx: hook preemption timer support"
Yunhong Jiang [Thu, 21 Jul 2016 17:36:25 +0000 (17:36 +0000)]
Merge "kvm: vmx: hook preemption timer support"

7 years agoMerge "kvm: vmx: rename vmx_pre/post_block to pi_pre/post_block"
Jiang, Yunhong [Thu, 21 Jul 2016 17:36:22 +0000 (17:36 +0000)]
Merge "kvm: vmx: rename vmx_pre/post_block to pi_pre/post_block"

7 years agoMerge "KVM: x86: support using the vmx preemption timer for tsc deadline timer"
Jiang, Yunhong [Thu, 21 Jul 2016 17:36:18 +0000 (17:36 +0000)]
Merge "KVM: x86: support using the vmx preemption timer for tsc deadline timer"

7 years agoMerge "kvm: lapic: separate start_sw_tscdeadline from start_apic_timer"
Jiang, Yunhong [Thu, 21 Jul 2016 17:36:13 +0000 (17:36 +0000)]
Merge "kvm: lapic: separate start_sw_tscdeadline from start_apic_timer"

7 years agoCreation of QEMU(rpm and debian builds) 45/16045/7
Swati Sharma [Tue, 28 Jun 2016 17:34:43 +0000 (02:34 +0900)]
Creation of QEMU(rpm and debian builds)

This includes the scripts that are added to create qemu-rpm
and qemu-debian builds for KVM4NFV.

Co-Authored-By: Gundarapu Reddy <reddyx.gundarapu@intel.com>
Signed-off-by: Swati Sharma <swatix.sharma@intel.com>
7 years agoMerge "Update fuel plugin builder installation"
Jiang, Yunhong [Tue, 19 Jul 2016 01:40:51 +0000 (01:40 +0000)]
Merge "Update fuel plugin builder installation"

7 years agoKVM: nVMX: keep preemption timer enabled during L2 execution 79/17079/1
Paolo Bonzini [Wed, 6 Jul 2016 11:23:51 +0000 (13:23 +0200)]
KVM: nVMX: keep preemption timer enabled during L2 execution

Because the vmcs12 preemption timer is emulated through a separate hrtimer,
we can keep on using the preemption timer in the vmcs02 to emulare L1's
TSC deadline timer.

However, the corresponding bit in the pin-based execution control field
must be kept consistent between vmcs01 and vmcs02.  On vmentry we copy
it into the vmcs02; on vmexit the preemption timer must be disabled in
the vmcs01 if a preemption timer vmexit happened while in guest mode.

The preemption timer value in the vmcs02 is set by vmx_vcpu_run, so it
need not be considered in prepare_vmcs02.

Cc: Yunhong Jiang <yunhong.jiang@intel.com>
Cc: Haozhong Zhang <haozhong.zhang@intel.com>
Tested-by: Wanpeng Li <kernellwp@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Change-Id: Iffaea7689d4e653dc6224a6f05c6e5ba2fb5c8a8
upstream-status: backport
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoKVM: nVMX: avoid incorrect preemption timer vmexit in nested guest 77/17077/1
Wanpeng Li [Wed, 6 Jul 2016 10:29:58 +0000 (18:29 +0800)]
KVM: nVMX: avoid incorrect preemption timer vmexit in nested guest

The preemption timer for nested VMX is emulated by hrtimer which is started on L2
entry, stopped on L2 exit and evaluated via the check_nested_events hook. However,
nested_vmx_exit_handled is always returning true for preemption timer vmexit.  Then,
the L1 preemption timer vmexit is captured and be treated as a L2 preemption
timer vmexit, causing NULL pointer dereferences or worse in the L1 guest's
vmexit handler:

    BUG: unable to handle kernel NULL pointer dereference at           (null)
    IP: [<          (null)>]           (null)
    PGD 0
    Oops: 0010 [#1] SMP
    Call Trace:
     ? kvm_lapic_expired_hv_timer+0x47/0x90 [kvm]
     handle_preemption_timer+0xe/0x20 [kvm_intel]
     vmx_handle_exit+0x169/0x15a0 [kvm_intel]
     ? kvm_arch_vcpu_ioctl_run+0xd5d/0x19d0 [kvm]
     kvm_arch_vcpu_ioctl_run+0xdee/0x19d0 [kvm]
     ? kvm_arch_vcpu_ioctl_run+0xd5d/0x19d0 [kvm]
     ? vcpu_load+0x1c/0x60 [kvm]
     ? kvm_arch_vcpu_load+0x57/0x260 [kvm]
     kvm_vcpu_ioctl+0x2d3/0x7c0 [kvm]
     do_vfs_ioctl+0x96/0x6a0
     ? __fget_light+0x2a/0x90
     SyS_ioctl+0x79/0x90
     do_syscall_64+0x68/0x180
     entry_SYSCALL64_slow_path+0x25/0x25
    Code:  Bad RIP value.
    RIP  [<          (null)>]           (null)
     RSP <ffff8800b5263c48>
    CR2: 0000000000000000
    ---[ end trace 9c70c48b1a2bc66e ]---

This can be reproduced readily by preemption timer enabled on L0 and disabled
on L1.

Return false since preemption timer vmexits must never be reflected to L2.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Yunhong Jiang <yunhong.jiang@intel.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Haozhong Zhang <haozhong.zhang@intel.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Change-Id: Iaffcd503666879e8157c8559876330110a66e5c4
upstream-status: backport
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoKVM: VMX: reflect broken preemption timer in vmcs_config 75/17075/1
Paolo Bonzini [Fri, 8 Jul 2016 09:53:38 +0000 (11:53 +0200)]
KVM: VMX: reflect broken preemption timer in vmcs_config

Simplify cpu_has_vmx_preemption_timer.  This is consistent with the
rest of setup_vmcs_config and preparatory for the next patch.

Tested-by: Wanpeng Li <kernellwp@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Change-Id: I3b33a881c5e47d5d3046e28374d0b0ca363ffad7
upstream-status: backport
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoKVM: vmx: fix missed cancellation of TSC deadline timer 73/17073/1
Wanpeng Li [Tue, 28 Jun 2016 06:54:19 +0000 (14:54 +0800)]
KVM: vmx: fix missed cancellation of TSC deadline timer

INFO: rcu_sched detected stalls on CPUs/tasks:
 1-...: (11800 GPs behind) idle=45d/140000000000000/0 softirq=0/0 fqs=21663
 (detected by 0, t=65016 jiffies, g=11500, c=11499, q=719)
Task dump for CPU 1:
qemu-system-x86 R  running task        0  3529   3525 0x00080808
 ffff8802021791a0 ffff880212895040 0000000000000001 00007f1c2c00db40
 ffff8801dd20fcd3 ffffc90002b98000 ffff8801dd20fc88 ffff8801dd20fcf8
 0000000000000286 ffff8801dd2ac538 ffff8801dd20fcc0 ffffffffc06949c9
Call Trace:
? kvm_write_guest_cached+0xb9/0x160 [kvm]
? __delay+0xf/0x20
? wait_lapic_expire+0x14a/0x200 [kvm]
? kvm_arch_vcpu_ioctl_run+0xcbe/0x1b00 [kvm]
? kvm_arch_vcpu_ioctl_run+0xe34/0x1b00 [kvm]
? kvm_vcpu_ioctl+0x2d3/0x7c0 [kvm]
? __fget+0x5/0x210
? do_vfs_ioctl+0x96/0x6a0
? __fget_light+0x2a/0x90
? SyS_ioctl+0x79/0x90
? do_syscall_64+0x7c/0x1e0
? entry_SYSCALL64_slow_path+0x25/0x25

This can be reproduced readily by running a full dynticks guest(since hrtimer
in guest is heavily used) w/ lapic_timer_advance disabled.

If fail to program hardware preemption timer, we will fallback to hrtimer based
method, however, a previous programmed preemption timer miss to cancel in this
scenario which results in one hardware preemption timer and one hrtimer emulated
tsc deadline timer run simultaneously. So sometimes the target guest deadline
tsc is earlier than guest tsc, which leads to the computation in vmx_set_hv_timer
can underflow and cause delta_tsc to be set a huge value, then host soft lockup
as above.

This patch fix it by cancelling the previous programmed preemption timer if there
is once we failed to program the new preemption timer and fallback to hrtimer
based method.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Change-Id: I8a2decefab743aecdfab676fb9267324bf42b848
upstream-status: backport
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoKVM: x86: introduce cancel_hv_tscdeadline 69/17069/1
Wanpeng Li [Thu, 30 Jun 2016 00:52:49 +0000 (08:52 +0800)]
KVM: x86: introduce cancel_hv_tscdeadline

Introduce cancel_hv_tscdeadline() to encapsulate preemption
timer cancel stuff.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Change-Id: Icc038176cbf361a9ecdf37ed3425108db57617f2
upstream-status: backport
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
7 years agoKVM: vmx: fix underflow in TSC deadline calculation 67/17067/1
Paolo Bonzini [Mon, 27 Jun 2016 13:08:01 +0000 (15:08 +0200)]
KVM: vmx: fix underflow in TSC deadline calculation

If the TSC deadline timer is programmed really close to the deadline or
even in the past, the computation in vmx_set_hv_timer can underflow and
cause delta_tsc to be set to a huge value.  This generally results
in vmx_set_hv_timer returning -ERANGE, but we can fix it by limiting
delta_tsc to be positive or zero.

Reported-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Change-Id: I12eea18c3ec648dbf782d7754b7b574d7d6aa92c
upstream-status: backport
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>