kvm-owner@xxxxxxxxxxxxxxx wrote on 07/06/2012 18:07:03: > > We described in the paper all the mechanisms we thought could be used. > Which of them did you implement and validate so far? shadow IDT + NP exception, preeemption timer, kicks via NMI, interrupt affinity > > Which mechanisms are sufficient/preferable/simpler ? I think we are back > > to the KVM<->Linux dependencies and whenever we are talking about > > hypervisors in general or a specific implementation for KVM. > > I don't think this depends on KVM vs. whatever hypervisor, these are > pretty generic considerations. Well, as you mentioned in a previous email, it might be difficult to get some changes upstreamed to the Linux Kernel (due to KVM/Linux asymmetric model) while they may be easy to integrate with other hypervisors. > If you need the preemption timer for breaking out of cli anyway, why > play tricks with off-limit vectors? NMIs can be useful to accelerate the > preemption when some other core wants to deliver an IPI (to kick the > target out of guest mode and to reenable interrupts, not to process them). Yep, you can use NMI if you need "immediate" kicking. The question is when/why you need immediate kicking (e.g. TLB flush). In my opinion, if you care about performance and you don't need immediate kicks then you can just deliver an interrupt and wait until the guest enables interrupts or the timer elapses. Remember that the guest disables interrupts to handle critical operations and a non-malicious guest is supposed to do so for a short period of time. So, if you can avoid interrupting the guest while it disabled interrupts, then, better to do so. Take for example the case a guest holds a spin lock for part of the time it disabled interrupts. If you don't interrupt the guest in this period, you could avoid lock-holder preemptions. -- 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