lkml.org 
[lkml]   [2012]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] KVM: trace mmio read event properly
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.

> + bytes, gpa, *(u64 *)val);

We get the wrong value for reads here, no?

Can't we leave the code as is, and infer the start of the event from the
last kvm_exit trace?

> handled = ops->read_write_mmio(vcpu, gpa, bytes, val);
> if (handled == bytes)
> return X86EMUL_CONTINUE;


--
error compiling committee.c: too many arguments to function



\
 
 \ /
  Last update: 2012-01-16 11:21    [W:0.139 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site