-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CVM: refactor ohcl/ovmm emulator for flexible register retrieval and …
…update (#482) ## Motivation 1. When an instruction is emulated for a CVM guest, the full guest register state is retrieved. For TDX, this dispatches an expensive TDCALL to read each segment register regardless of whether it is necessary for the emulation. 1. The existing emulator code allowed arbitrary guest registers to be written: if the register is considered immutable, the update is silently dropped. ## Changes * The emulator frontend no longer has a guest `state` struct. Instead, the frontend calls functions to read and update register state. * Each backend defines and implements its own register state struct. On a register read/write, the backend has the flexibility to choose whether a register should be read from this struct, or pass through directly to the backing. With the exception of segment registers for the TDX backing, the existing behavior has been preserved, e.g. reading XMM registers passes through to the backing, and GPs are read from the state struct. --------- Co-authored-by: Steven Malis <[email protected]>
- Loading branch information
1 parent
95bb080
commit ae9351b
Showing
68 changed files
with
2,141 additions
and
1,316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.