[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F14DEB5.6020902@linux.vnet.ibm.com>
Date: Tue, 17 Jan 2012 10:36:37 +0800
From: Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>
To: Avi Kivity <avi@...hat.com>
CC: Marcelo Tosatti <mtosatti@...hat.com>,
LKML <linux-kernel@...r.kernel.org>, KVM <kvm@...r.kernel.org>
Subject: Re: [PATCH 1/3] KVM: trace mmio read event properly
On 01/16/2012 06:18 PM, Avi Kivity wrote:
> On 01/16/2012 11:31 AM, Xiao Guangrong wrote:
>> In current code, we use KVM_TRACE_MMIO_READ to trace mmio read event which
>> only can be completed immediately, instead of it, we trace the time when
>> read event occur, then cooperate with then later patch, we can know the time
>> of mmio read emulation
>>
>> @@ -3744,6 +3740,8 @@ mmio:
>> /*
>> * Is this MMIO handled locally?
>> */
>> + trace_kvm_mmio(write ? KVM_TRACE_MMIO_WRITE : KVM_TRACE_MMIO_READ,
>
> It's better to push the conditional to the trace event itself, so it's
> only evaluated if tracing is enabled.
>
Yes.
>> + bytes, gpa, *(u64 *)val);
>
> We get the wrong value for reads here, no?
>
Yes, the value is meaningless in this point.
> Can't we leave the code as is, and infer the start of the event from the
> last kvm_exit trace?
Yes, we can do it, but the same problems is we need trace vcpu id to get its
vmexit, i will do it in the next version if you like this way :)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists