Xin Tong writes: > My main concern here is not how timely the interrupts can be handled, > i am more interested in reducing the number of TB enters/exits due to > interrupt. Returning to qemu mainloop requires saving and restoring > register contexts which are expensive, what i am thinking is that can > we check and handle interrupts every few TBs executed. But the > drawback is that I do not know how many TBs would be a good number > such that the interrupts do not get delayed too much.
I think a maximum amount of guest time for which interrupts can be delayed would provide a better response (maybe together with a maximum number of delayed interrupts). For that you could program a "special" timer that forces a return-from-guest, whatever the mechanism. But I'm sure that's going to make the system slower than just checking every fixed number of TBs. Lluis -- "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth