From: Marcelo Tosatti <mtosatti@redhat.com>
To: "Liu, Jinsong" <jinsong.liu@intel.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
"Tian, Kevin" <kevin.tian@intel.com>, Avi Kivity <avi@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [PATCH 2/2] Qemu co-operation with kvm tsc deadline timer
Date: Wed, 14 Sep 2011 08:47:20 -0300 [thread overview]
Message-ID: <20110914114720.GB20351@amt.cnet> (raw)
In-Reply-To: <BC00F5384FCFC9499AF06F92E8B78A9E254455B9BB@shsmsx502.ccr.corp.intel.com>
On Wed, Sep 14, 2011 at 10:51:41AM +0800, Liu, Jinsong wrote:
> Jan Kiszka wrote:
> > On 2011-09-13 16:38, Liu, Jinsong wrote:
> >> From c1b502d6548fcc41592cd90acc82109ee949df75 Mon Sep 17 00:00:00
> >> 2001
> >> From: Liu, Jinsong <jinsong.liu@intel.com>
> >> Date: Tue, 13 Sep 2011 22:05:30 +0800
> >> Subject: [PATCH] Qemu co-operation with kvm tsc deadline timer
> >>
> >> KVM add emulation of lapic tsc deadline timer for guest.
> >> This patch is co-operation work at qemu side.
> >>
> >> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> ---
> >> target-i386/cpu.h | 2 ++
> >> target-i386/kvm.c | 14 ++++++++++++++
> >> 2 files changed, 16 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/target-i386/cpu.h b/target-i386/cpu.h
> >> index 935d08a..62ff73c 100644
> >> --- a/target-i386/cpu.h
> >> +++ b/target-i386/cpu.h
> >> @@ -283,6 +283,7 @@
> >> #define MSR_IA32_APICBASE_BSP (1<<8)
> >> #define MSR_IA32_APICBASE_ENABLE (1<<11)
> >> #define MSR_IA32_APICBASE_BASE (0xfffff<<12)
> >> +#define MSR_IA32_TSCDEADLINE 0x6e0
> >>
> >> #define MSR_MTRRcap 0xfe
> >> #define MSR_MTRRcap_VCNT 8
> >> @@ -687,6 +688,7 @@ typedef struct CPUX86State {
> >> uint64_t async_pf_en_msr;
> >>
> >> uint64_t tsc;
> >> + uint64_t tsc_deadline;
> >
> > This field has to be saved/restored for snapshots/migrations.
> >
> > Frankly, I've no clue right now if substates are in vogue again (they
> > had problems in their binary format) or if you can simply add a
> > versioned top-level field and bump the CPUState version number.
> >
>
> Yes, it would be saved/restored. After migration, tsc_deadline would be set to MSR_IA32_TSCDEADLINE to trigger tsc timer interrupt.
Jan means you should explicitly add this to machine.c.
prev parent reply other threads:[~2011-09-14 11:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-13 14:38 [PATCH 2/2] Qemu co-operation with kvm tsc deadline timer Liu, Jinsong
2011-09-13 15:12 ` Jan Kiszka
2011-09-14 2:51 ` Liu, Jinsong
2011-09-14 11:47 ` Marcelo Tosatti [this message]
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=20110914114720.GB20351@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=jinsong.liu@intel.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.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