From: "Nadav Har'El" <nyh@math.technion.ac.il>
To: Alexander Graf <agraf@suse.de>
Cc: Zachary Amsden <zamsden@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"joro@8bytes.org" <joro@8bytes.org>, Avi Kivity <avi@redhat.com>
Subject: Re: TSC in nested SVM and VMX
Date: Sun, 3 Oct 2010 10:35:09 +0200 [thread overview]
Message-ID: <20101003083509.GA21130@fermat.math.technion.ac.il> (raw)
In-Reply-To: <139B2203-E0AE-4518-BE38-F0CC851777FB@suse.de>
On Sun, Oct 03, 2010, Alexander Graf wrote about "Re: TSC in nested SVM and VMX":
> Looking through the spec, the only indicator I've found is this passage:
>
> TSC_OFFSET - an offset to add when the guest reads the TSC (time stamp
> counter). Guest writes to the TSC can be intercepted and emulated by
> changing the offset (without writing the physical TSC). This offset is
> cleared when the guest exits back to the host.
>
> So apparently writes to TSC don't affect tsc_offset, but instead affect
> the host's tsc skew. So with nesting a non-intercepted tsc write affects
> L1's tsc_offset. This means the code is correct. Sorry for the fuss :).
I don't understand, how does this passage imply that writes to the TSC don't
affect the tsc_offset? It says that "writes to the TSC" can (I don't know why
this word was used...) "changing the offset". I don't understand why a guest
should be allowed to ruin its host's TSC (or in the nested case, why an L2
should be allowed to ruin L1's TSC without L1's knowledge) - isn't this
exactly why the TSC offset exists?
--
Nadav Har'El | Sunday, Oct 3 2010, 25 Tishri 5771
nyh@math.technion.ac.il |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |"Computers are useless. They can only
http://nadav.harel.org.il |give you answers." -- Pablo Picasso
next prev parent reply other threads:[~2010-10-03 8:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-30 22:50 TSC in nested SVM and VMX Nadav Har'El
2010-10-01 4:38 ` Zachary Amsden
2010-10-01 11:21 ` Nadav Har'El
2010-10-01 14:46 ` Alexander Graf
2010-10-01 19:22 ` Zachary Amsden
2010-10-02 1:56 ` Alexander Graf
2010-10-02 11:19 ` Alexander Graf
2010-10-02 22:46 ` Zachary Amsden
2010-10-03 0:01 ` Alexander Graf
2010-10-03 8:35 ` Nadav Har'El [this message]
2010-10-03 9:01 ` Alexander Graf
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=20101003083509.GA21130@fermat.math.technion.ac.il \
--to=nyh@math.technion.ac.il \
--cc=agraf@suse.de \
--cc=avi@redhat.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=zamsden@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.