summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/ring0/defs.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/platform/ring0/defs.go')
-rw-r--r--pkg/sentry/platform/ring0/defs.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/pkg/sentry/platform/ring0/defs.go b/pkg/sentry/platform/ring0/defs.go
index 9d947b73d..7b3bed1c7 100644
--- a/pkg/sentry/platform/ring0/defs.go
+++ b/pkg/sentry/platform/ring0/defs.go
@@ -91,3 +91,22 @@ type CPU struct {
func (c *CPU) Registers() *syscall.PtraceRegs {
return &c.registers
}
+
+// SwitchOpts are passed to the Switch function.
+type SwitchOpts struct {
+ // Registers are the user register state.
+ Registers *syscall.PtraceRegs
+
+ // FloatingPointState is a byte pointer where floating point state is
+ // saved and restored.
+ FloatingPointState *byte
+
+ // PageTables are the application page tables.
+ PageTables *pagetables.PageTables
+
+ // Flush indicates that a TLB flush should be forced on switch.
+ Flush bool
+
+ // FullRestore indicates that an iret-based restore should be used.
+ FullRestore bool
+}