From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] MIPS: KVM: Fix trace event to save PC directly Date: Mon, 2 Mar 2015 19:15:36 -0300 Message-ID: <20150302221536.GA4095@amt.cnet> References: <1424778380-28036-1-git-send-email-james.hogan@imgtec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Paolo Bonzini , Ralf Baechle , Gleb Natapov , Steven Rostedt , Ingo Molnar , linux-mips@linux-mips.org, kvm@vger.kernel.org, stable@vger.kernel.org To: James Hogan Return-path: Received: from mx1.redhat.com ([209.132.183.28]:33185 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932099AbbCBWQF (ORCPT ); Mon, 2 Mar 2015 17:16:05 -0500 Content-Disposition: inline In-Reply-To: <1424778380-28036-1-git-send-email-james.hogan@imgtec.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Feb 24, 2015 at 11:46:20AM +0000, James Hogan wrote: > Currently the guest exit trace event saves the VCPU pointer to the > structure, and the guest PC is retrieved by dereferencing it when the > event is printed rather than directly from the trace record. This isn't > safe as the printing may occur long afterwards, after the PC has changed > and potentially after the VCPU has been freed. Usually this results in > the same (wrong) PC being printed for multiple trace events. It also > isn't portable as userland has no way to access the VCPU data structure > when interpreting the trace record itself. > > Lets save the actual PC in the structure so that the correct value is > accessible later. Applied, thanks.