Re: [PATCH 2/3] Improve DEC handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 21, 2009 at 10:13 AM, Hollis Blanchard
<hollis@xxxxxxxxxxxxxx> wrote:
>  void kvmppc_emulate_dec(struct kvm_vcpu *vcpu)
>  {
>        unsigned long dec_nsec;
>
>        pr_debug("mtDEC: %x\n", vcpu->arch.dec);
>  #ifdef CONFIG_PPC64
>        /* POWER4+ triggers a dec interrupt if the value is < 0 */
>        if (vcpu->arch.dec & 0x80000000) {
>                hrtimer_try_to_cancel(&vcpu->arch.dec_timer);
>                kvmppc_core_queue_dec(vcpu);
> +               /* keep queuing interrupts until guest clears high MSR bit */
> +               hrtimer_start(&vcpu->arch.dec_timer, ktime_set(0, 100),
> +                             HRTIMER_MODE_REL);
>                return;
>        }
>  #endif

Of course, removing the hardcoded 100-ns timer would be better, and
indeed we can do that. What we *really* want is to key off of MSR[EE]
changes (there's no point in queuing anything until then). So why not
move your "AGGRESSIVE_DEC" check into Book 3S's kvmppc_set_msr()?

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

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux