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.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to