From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga01-in.huawei.com ([58.251.152.64]:56364 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933071AbcCNAmA (ORCPT ); Sun, 13 Mar 2016 20:42:00 -0400 Subject: Re: [PATCH] KVM: x86: move steal time initialization to vcpu entry time To: Liang Chen , References: <1457686391-17855-1-git-send-email-liangchen.linux@gmail.com> CC: , , , , From: Zefan Li Message-ID: <56E608CD.2060802@huawei.com> Date: Mon, 14 Mar 2016 08:41:49 +0800 MIME-Version: 1.0 In-Reply-To: <1457686391-17855-1-git-send-email-liangchen.linux@gmail.com> Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On 2016/3/11 16:53, Liang Chen wrote: > From: Marcelo Tosatti > > commit 7cae2bedcbd4680b155999655e49c27b9cf020fa upstream > > This patch is needed on lts 3.4, 3.10, 3.12, 3.14, 3.18, and 4.1 for > the same issue. Can you please to pick it up? > Sure. I'll queue it up for 3.4.y. Thanks! > As reported at https://bugs.launchpad.net/qemu/+bug/1494350, > it is possible to have vcpu->arch.st.last_steal initialized > from a thread other than vcpu thread, say the iothread, via > KVM_SET_MSRS. > > Which can cause an overflow later (when subtracting from vcpu threads > sched_info.run_delay). > > To avoid that, move steal time accumulation to vcpu entry time, > before copying steal time data to guest. > > Signed-off-by: Marcelo Tosatti > Reviewed-by: David Matlack > Signed-off-by: Paolo Bonzini