> Andi, is there some way we can get the CFI stuff right for those > pushes/pops? For entry.S yes (just use the CFI_* macros), but we currently don't know how to do it for inline assembly. > > > I would highly recommend using ECX or EDX. The choice of ESI being > > unused is really arbitrary, and it makes it incredibly difficult to > > try to express passing a VCPU data reference in ESI (that is what it > > is used for, right?) to a C function. In several places, entry.S > > calls out to C code and expects EAX, EDX, and ECX to come back > > clobbered, so there are wide windows there in which the registers are > > not live, whereas the code could quite reasonably expect ESI to be > > preserved across those boundaries. > > I think you're right; it shouldn't be too hard to do a bit of register > renaming in entry.S to make things work out nicely. I'm not sure that's a good idea. Is there really any hook that is complex enough that it can't be written in pure assembly? -Andi