linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jim Mattson <jmattson@google.com>,
	Luiz Capitulino <lcapitulino@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	rostedt@goodmis.org, mhiramat@kernel.org, mtosatti@redhat.com
Subject: Re: [PATCH 2/6] kvm: x86: drop read_tsc_offset()
Date: Mon, 19 Sep 2016 17:34:28 +0200	[thread overview]
Message-ID: <41e7b724-07dd-9c9d-3119-c12e50adbe44@redhat.com> (raw)
In-Reply-To: <CALMp9eQPifCXi-gDEfHciCBHoEfQ34WUGud-K2T-HHuEGFNuCg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 496 bytes --]



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.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2016-09-19 15:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-16 14:27 [PATCH v2 0/6] kvm: x86: export TSC information to user-space Luiz Capitulino
2016-09-16 14:27 ` [PATCH 1/6] kvm: x86: add tsc_offset field to struct kvm_vcpu_arch Luiz Capitulino
2016-09-16 14:27 ` [PATCH 2/6] kvm: x86: drop read_tsc_offset() Luiz Capitulino
2016-09-19 15:30   ` Jim Mattson
2016-09-19 15:34     ` Paolo Bonzini [this message]
2016-09-19 22:18       ` Jim Mattson
2016-09-20  5:37         ` Paolo Bonzini
2016-09-21 15:19           ` Jim Mattson
2016-09-21 15:22             ` Paolo Bonzini
2016-09-21 15:31               ` Jim Mattson
2016-09-16 14:27 ` [PATCH 3/6] kvm: kvm_destroy_vm_debugfs(): check debugfs_stat_data pointer Luiz Capitulino
2016-09-16 14:27 ` [PATCH 4/6] kvm: add stubs for arch specific debugfs support Luiz Capitulino
2016-09-16 14:27 ` [PATCH 5/6] kvm: create per-vcpu dirs in debugfs Luiz Capitulino
2016-09-16 14:27 ` [PATCH 6/6] kvm: x86: export TSC information to user-space Luiz Capitulino
2016-09-16 14:56 ` [PATCH v2 0/6] " Paolo Bonzini
2016-09-16 14:59   ` Luiz Capitulino
2016-09-16 14:59     ` Paolo Bonzini
2016-09-16 15:11       ` Luiz Capitulino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41e7b724-07dd-9c9d-3119-c12e50adbe44@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=lcapitulino@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).