[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALMp9eR=cedw-=2J3RuK4wT87_Z1qg2ue_PpwgPy=Ddnnu38fQ@mail.gmail.com>
Date: Mon, 19 Sep 2016 15:18:02 -0700
From: Jim Mattson <jmattson@...gle.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Luiz Capitulino <lcapitulino@...hat.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Radim Krčmář <rkrcmar@...hat.com>,
rostedt@...dmis.org, mhiramat@...nel.org, mtosatti@...hat.com
Subject: Re: [PATCH 2/6] kvm: x86: drop read_tsc_offset()
Hmmm. Yes, I think it does. With this patch series,
vcpu->arch.tsc_offset appears to contain L1's TSC offset (perhaps
making vmx->nested.vmcs01_tsc_offset redundant).
However, this unfortunately limits the newly added functionality to
merging host and *L1* guest traces. It doesn't work with L2 (or
deeper) guests. Or perhaps I'm missing something?
On Mon, Sep 19, 2016 at 8:34 AM, Paolo Bonzini <pbonzini@...hat.com> wrote:
>
>
> On 19/09/2016 17:30, Jim Mattson wrote:
>> vmx_read_tsc_offset has a bug when running nested VMs. It should really be:
>>
>> if (is_guest_mode(vcpu))
>> return to_vmx(vcpu)->nested.vmcs01_tsc_offset;
>> else
>> return vmcs_read64(TSC_OFFSET);
>>
>> Perhaps a better name woulf be "vmx_get_l1_tsc_offset."
>
> I agree, but doesn't this patch fix the bug too?
>
> Paolo
>
>> In any case, this does not seem consistent with vcpu->arch.tsc_offset.
>
Powered by blists - more mailing lists