Jeremy Fitzhardinge wrote:
This is a fairly close match to Xen's requirements. Certainly, anything APIC-related is useless for us, since there's no APIC emulation going on. I won't speak for Zach, but his counter-argument is generally along the lines of "we can just make use of the existing code with a couple of little hooks near the bottom". But I wonder if the existing genapic interface can be used (or extended) to cover these cases without having needing to have APIC-level interfaces in paravirt_ops.
Because we faithfully emulate the APIC and IO-APIC, that is the underlying hardware for us, and we don't have a fancy paravirtualized interrupt controller because there is no need for it. The only obstruction to this approach is that trapping and emulating APIC access is slow. And some APIC registers have side effects on read. So we simply replace APIC read / write with faster hypercalls.
Of course we can create a bunch of new code to use the genapic interface. It is just a matter of copying apic.c and io-apic.c verbatim and applying the sed command s/apic/vmi_apic/g. We can easily do this, but the only point would be to eliminate the low-level APIC access paravirt-op, which is not a maintenance burden, performance problem, or encumberance on anyone. So it would be purely a cleanliness thing. Doubling code to make two separate copies when the interface in question is already well abstracted and contained in a header file doesn't make it cleaner, at least to me.
Zach _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/virtualization