It's still a waste of effort, though. Also, I'd eventually like the number of places in Xen code in which rsp/esp is invalid to be exactly zero, and this approach makes this harder or even impossible.
Does PVH hook into the entry asm code at all? I thought it was just
boot code and drivers.
In any case, someone needs to do some serious review and cleanup on
the whole paravirt op mess. We have a bunch of paravirt ops that
serve little purpose.
The paravirt infrastructure is a bit weird, too: it seems to
effectively have four states for each patch site. There's:
1. The initial state, which is unoptimized and works on native.
Presumably any of these that happen early also need to work, if
slowly, on Xen.
2. The Xen state without text patching. I'm not actually sure why
this exists at all. Are there pvops that need to switch too early for
us to patch the text?