<div dir="ltr"><div><div><div><div><div><div><div><div>Hi all,<br><br></div>I&#39;d like to communicate to a plugin whenever a (x86_64) guest calls the clflush, clflushopt, or clwb instructions. <br>Does anyone have any pointers or documentation where I should look to begin implementing this?<br><br></div>From what I can tell so far:<br></div>* TCG translation of clwb/clflush/clflushopt simply call &quot;gen_nop_modrm&quot;, which does nothing<br></div>* TCG-&gt;native codegen is where panda&#39;s memory hooks are inserted<br><br></div>Would this be a valid (if ad-hoc) plan?<br></div>* Modify QEMU TCG to have some concept of &quot;clflush/clwb/clflushopt&quot; and emit this from code-&gt;TCG translation<br></div>* add a new panda callback type for &quot;clflush/clwb/clflushopt&quot;<br>* change TCG-&gt;native codegen to inject a call to panda callbacks<br><br></div><div>Thanks,<br></div><div>Vincent<br></div></div>