Re: Detecting Faulting Instructions From Plugins

2021-02-11 Thread Aaron Lindsay via
On Feb 11 17:27, Alex Bennée wrote: > Aaron Lindsay writes: > > On Feb 05 15:03, Alex Bennée wrote: > >> Aaron Lindsay writes: > >> > Assuming you're right that TCG is detecting "a io_readx/io_writex when > >> > ->can_do_io is not true", could we detect this case when it occurs and > >> > omit th

Re: Detecting Faulting Instructions From Plugins

2021-02-11 Thread Alex Bennée
Aaron Lindsay writes: > On Feb 05 15:03, Alex Bennée wrote: >> Aaron Lindsay writes: >> > Assuming you're right that TCG is detecting "a io_readx/io_writex when >> > ->can_do_io is not true", could we detect this case when it occurs and >> > omit the instruction callbacks for the re-translatio

Re: Detecting Faulting Instructions From Plugins

2021-02-05 Thread Alex Bennée
Aaron Lindsay writes: > On Feb 05 15:03, Alex Bennée wrote: >> Aaron Lindsay writes: >> > Assuming you're right that TCG is detecting "a io_readx/io_writex when >> > ->can_do_io is not true", could we detect this case when it occurs and >> > omit the instruction callbacks for the re-translatio

Re: Detecting Faulting Instructions From Plugins

2021-02-05 Thread Aaron Lindsay via
On Feb 05 15:03, Alex Bennée wrote: > Aaron Lindsay writes: > > Assuming you're right that TCG is detecting "a io_readx/io_writex when > > ->can_do_io is not true", could we detect this case when it occurs and > > omit the instruction callbacks for the re-translation of the single > > instruction

Re: Detecting Faulting Instructions From Plugins

2021-02-05 Thread Aaron Lindsay via
On Feb 05 15:03, Alex Bennée wrote: > I'll see what Richard thinks. I must admit I thought can_do_io was only > an issue for -icount modes but I think the real picture is slightly more > confused than that. I am using -icount. I apologize for not including that originally - I didn't realize it mat

Re: Detecting Faulting Instructions From Plugins

2021-02-05 Thread Alex Bennée
Aaron Lindsay writes: > On Feb 05 11:19, Alex Bennée wrote: >> Aaron Lindsay writes: >> >> > For the below output, I've got a plugin which registers a callback via >> > `qemu_plugin_register_vcpu_insn_exec_cb` for each instruction executed. >> > I've enabled `-d in_asm` and added prints in my

Re: Detecting Faulting Instructions From Plugins

2021-02-05 Thread Aaron Lindsay via
On Feb 05 11:19, Alex Bennée wrote: > Aaron Lindsay writes: > > > For the below output, I've got a plugin which registers a callback via > > `qemu_plugin_register_vcpu_insn_exec_cb` for each instruction executed. > > I've enabled `-d in_asm` and added prints in my instruction execution > > callba

Re: Detecting Faulting Instructions From Plugins

2021-02-05 Thread Alex Bennée
Aaron Lindsay writes: > On Jan 29 22:23, Aaron Lindsay wrote: >> I appear to be seeing that if I register a callback for an instruction >> via `qemu_plugin_register_vcpu_insn_exec_cb` I receive a callback even >> if the instruction faults. > > I was wrong about what I was seeing - I made some f

Re: Detecting Faulting Instructions From Plugins

2021-02-04 Thread Aaron Lindsay
On Jan 29 22:23, Aaron Lindsay wrote: > I appear to be seeing that if I register a callback for an instruction > via `qemu_plugin_register_vcpu_insn_exec_cb` I receive a callback even > if the instruction faults. I was wrong about what I was seeing - I made some false assumptions based on incomple

Re: Detecting Faulting Instructions From Plugins

2021-02-01 Thread Alex Bennée
Aaron Lindsay writes: > On Jan 29 22:23, Aaron Lindsay wrote: >> 1. Is this considered a bug or a "feature"? >> 2.a. If a bug, is there a good way to detect this from inside the >> tcg/plugin infrastructure and avoid calling the callback for the >> faulting execution of the instruct

Re: Detecting Faulting Instructions From Plugins

2021-01-30 Thread Aaron Lindsay
On Jan 29 22:23, Aaron Lindsay wrote: > 1. Is this considered a bug or a "feature"? > 2.a. If a bug, is there a good way to detect this from inside the >tcg/plugin infrastructure and avoid calling the callback for the >faulting execution of the instruction? > 2.b. If a "feature", is

Detecting Faulting Instructions From Plugins

2021-01-29 Thread Aaron Lindsay
Hello, I appear to be seeing that if I register a callback for an instruction via `qemu_plugin_register_vcpu_insn_exec_cb` I receive a callback even if the instruction faults. For example, if an instruction attempts to load memory from a page which isn't currently mapped by the OS, I receive two c