发明名称 Control flow management for execution of dynamically translated non-native code in a virtual hosting environment
摘要 Execution of non-native operating system images within a virtualized computer system is improved by providing a mechanism for retrieving translated code physical addresses corresponding to un-translated code branch target addresses using a host code map. Hardware acceleration mechanisms, such as content-accessible look-up tables, directory hardware, or processor instructions that operate on tables in memory can be provided to accelerate the performance of the translation mechanism. The virtual address of the branch instruction target is used as a key to look up a corresponding record that contains a physical address of the translated code page containing the translated branch instruction target, and execution is directed to the physical address obtained from the record, once the physical page containing the translated code corresponding the target address is loaded in memory.
申请公布号 US8819648(B2) 申请公布日期 2014.08.26
申请号 US201213554141 申请日期 2012.07.20
申请人 International Business Machines Corporation 发明人 Brown Alexander Barraclough
分类号 G06F9/45 主分类号 G06F9/45
代理机构 代理人 Tyson Thomas E.
主权项 1. A computer-performed method for hosting guest program code having a non-native instruction set executing within a host operating system within a virtualized computer system, the method comprising: dynamically translating the guest program code to translated native program code; caching pages of the translated native program code in a translated native code page cache; executing the translated native program code; detecting that a portion of the translated native program code corresponding to a non-native branch instruction will cause the executing to be directed to a particular translated code physical address corresponding to a particular non-native virtual address in a different first non-native virtual memory page than a second non-native virtual memory page containing the non-native branch instruction; responsive to detecting that the program control instruction will cause the executing to be directed to the particular translated code physical address, retrieving a record indicating a location of a translated code page containing the particular translated code physical address using the particular non-native virtual address as a key into a host code map that directly maps non-native virtual addresses to translated code physical addresses, wherein the retrieving comprises adding the particular non-native virtual address to a base address of the host code map to obtain a pointer into the host code map corresponding to an address at which the record is stored and de-referencing the pointer to obtain the record; loading the translated code page into physical memory; and directing the executing to the particular translated code physical address in the translated code page.
地址 Armonk NY US