From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] KVM: x86: move steal time initialization to vcpu entry time Date: Fri, 16 Oct 2015 10:34:54 +0200 Message-ID: <5620B6AE.9020004@redhat.com> References: <20151014223309.GA13900@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm list , Rik van Riel , "Dr. David Alan Gilbert" , Amit Shah To: David Matlack , Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:54335 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751334AbbJPIe7 (ORCPT ); Fri, 16 Oct 2015 04:34:59 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 15/10/2015 19:10, David Matlack wrote: > > 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 Applied to kvm/queue. Thanks Marcelo, and thanks David for the review. Paolo