Blue Swirl writes: > On Tue, Aug 30, 2011 at 7:36 PM, Lluís <xscr...@gmx.net> wrote: >> Blue Swirl writes: >> >>> Even better, taking the instrumentation approach, could the test >>> device be left out completely, just use guest invisible methods (like >>> watchpoints) to interact with the guest? >> >> I don't get it. Sorry but I've not been closely following the thread, >> and a quick look at it gave me no clues about what you mean.
> The use case for the proposed test device is that guest and host can > interact during testing and debugging, preferably not for production. > But I think instrumentation needs are not unlike this case. I think I > proposed earlier to you that instead of intrusive code changes, guest > invisible methods, for example watchpoints and virtual hardware could > be used. Maybe we could be able to solve several problems at once? If > the test device would provide a generic way to connect to an external > program, wouldn't that be useful also for instrumentation? Ah, now I get it. Well, guest-host interaction is what I call the backdoor channel, which from my point of view is orthogonal to instrumentation. Of course, you could implement the former on top of the latter. But I still believe using watchpoints is too heavyweight for the kind of instrumentation that I want (watchpoints go through the slow memory access path, while I instrument the guest during TCG code generation), and does not support all the kinds of information that I want to gather (i.e., the registers that a specific guest instruction is using). On the other hand, you really convinced me that using virtual devices is the right thing to do to implement a backdoor channel, as opposed to my previous approach of adding per-target special instructions. Thus it will work in all modes (TCG and KVM) and in all targets. 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