We're addressing that by blowing away the shadow cache and holding the
big kvm lock to ensure SMP safety. Not a great thing to do from a
performance perspective but the whole point of patching is that the cost
is amortized.
So then each module creates a hypercall page using this magic MSR and
the hypervisor has to keep track of it so that it can appropriately
change the page on migration. The page can only contain a single
instruction or else it cannot be easily changed (or you have to be able
to prevent the guest from being migrated while in the hypercall page).
We're really talking about identical models. Instead of an MSR, the #GP
is what tells the hypervisor to update the instruction. The nice thing
about this is that you don't have to keep track of all the current
hypercall page locations in the hypervisor.
Regards,
Anthony Liguori
-