Binary translation is used to rewrite in terms of ring 3 instructions certain ring 0 instructions, such as POPF, that would otherwise fail silently or behave differently when executed above ring 0,[3][4]:3 making the classic trap-and-emulate virtualization impossible.[4]:1[5] To improve performance, the translated basic blocks need to be cached in a coherent way that detects code patching (used in VxDs for instance), the reuse of pages by the guest OS, or even self-modifying code.[6] A number of key data structures used by a processor need to be shadowed.