summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/kvm/kvm.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/platform/kvm/kvm.go')
-rw-r--r--pkg/sentry/platform/kvm/kvm.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/pkg/sentry/platform/kvm/kvm.go b/pkg/sentry/platform/kvm/kvm.go
index b49d7f3c4..ee4cd2f4d 100644
--- a/pkg/sentry/platform/kvm/kvm.go
+++ b/pkg/sentry/platform/kvm/kvm.go
@@ -141,3 +141,17 @@ func (k *KVM) NewContext() platform.Context {
machine: k.machine,
}
}
+
+type constructor struct{}
+
+func (*constructor) New(f *os.File) (platform.Platform, error) {
+ return New(f)
+}
+
+func (*constructor) OpenDevice() (*os.File, error) {
+ return OpenDevice()
+}
+
+func init() {
+ platform.Register("kvm", &constructor{})
+}