From: Sasha Levin <levinsasha928@gmail.com>
To: Avi Kivity <avi@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
Alexey Zaytsev <alexey.zaytsev@gmail.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
jinsong.liu@intel.com, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: Don't automatically expose the TSC deadline timer in cpuid
Date: Sun, 25 Dec 2011 21:00:08 +0200 [thread overview]
Message-ID: <1324839608.3261.10.camel@lappy> (raw)
In-Reply-To: <1324818200-15660-1-git-send-email-avi@redhat.com>
On Sun, 2011-12-25 at 15:03 +0200, Avi Kivity wrote:
> +The TSC deadline timer feature (CPUID leaf 1, ecx[24]) is always returned
> +as false, since the feature depends on KVM_CREATE_IRQCHIP for local APIC
> +support. Instead it is reported via
> +
> + ioctl(KVM_CHECK_EXTENSION, KVM_CAP_TSC_DEADLINE_TIMER)
> +
> +if that returns true you use KVM_CREATE_IRQCHIP, or if emulate the
> +feature in userspace, then you can enable the feature for KVM_SET_CPUID2.
Thats a bit strange, it's going to be a somewhat ugly special case in
userspace code. It also means we can't simply proxy through CPUID from
kernel to the guest and only disable things we don't support, we now
have to enable them as well.
> + if (apic) {
> + if (best->ecx & bit(X86_FEATURE_TSC_DEADLINE_TIMER))
> + apic->lapic_timer.timer_mode_mask = 3 << 17;
> + else
> + apic->lapic_timer.timer_mode_mask = 1 << 17;
> + }
Can we change these to be:
if(...)
apic->lapic_timer.timer_mode_mask = APIC_LVT_TIMER_PERIODIC | APIC_LVT_TIMER_TSCDEADLINE;
else
apic->lapic_timer.timer_mode_mask = APIC_LVT_TIMER_PERIODIC;
--
Sasha.
next prev parent reply other threads:[~2011-12-25 19:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-25 13:03 [PATCH] KVM: Don't automatically expose the TSC deadline timer in cpuid Avi Kivity
2011-12-25 18:39 ` Jan Kiszka
2011-12-26 11:14 ` Avi Kivity
2011-12-25 19:00 ` Sasha Levin [this message]
2011-12-25 19:47 ` Sasha Levin
2011-12-26 8:51 ` Liu, Jinsong
2011-12-26 0:44 ` Jan Kiszka
2011-12-26 8:42 ` Liu, Jinsong
2011-12-26 10:35 ` Avi Kivity
2011-12-26 10:43 ` Alexey Zaytsev
2011-12-26 10:45 ` Avi Kivity
2011-12-26 11:25 ` Alexey Zaytsev
2011-12-26 11:28 ` Avi Kivity
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=1324839608.3261.10.camel@lappy \
--to=levinsasha928@gmail.com \
--cc=alexey.zaytsev@gmail.com \
--cc=avi@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=jinsong.liu@intel.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@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 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).