On Wed, 2009-07-08 at 11:06 +0300, Avi Kivity wrote: > > I don't see how the mmu structure matters. All mmu notifiers does is > tell you when Linux wants to drop a pte, it's completely up to you how > to use this information. > > There are three ways of dealing with the problem: > > - ignore it (ia64, ppc) > > Easy to implement, but you can't swap or do any fancy stuff like page > migration. If you have a large tlb/shadow, you pin a lot of pages. Hrm... with MOL we used to just patch into the low level hash invalidate, which is called to invalidate the translation from the hash table when Linux invalidates the PTE. I haven't quite figured out yet what Alexander does. We could probably use an mmu_notifier for that provided it's not too high level ie, we may want to stick to whacking the hash code which does some fancy stuff... > - use mmu notifiers (x86) > > Need reverse mapping to convert guest physical addresses to shadow/tlb > addresses. Not difficult to implement but requires careful locking. Well, as I said, we may want to implement that completely differently at a lower level, purely at the hash level, and thus use a different infrastructure. At least that's what MOL did and swap etc... worked just fine. I need to get more familiar with Alex code to see how he does things vs. the MMU, but we definitely need to think it through. > Can you explain your concerns? Nothing really just yet. As I said, I need to get my head around Alex code and figure before I take a position here. It might just be easier for us to hook into the low level hash table invalidation code instead and totally ignore the linux PTEs. Cheers, Ben. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html