Matching vmd(8) part of previous diff (first part of vmctl send/receive).
authormlarkin <mlarkin@openbsd.org>
Tue, 2 May 2017 02:58:24 +0000 (02:58 +0000)
committermlarkin <mlarkin@openbsd.org>
Tue, 2 May 2017 02:58:24 +0000 (02:58 +0000)
ok kettenis

usr.sbin/vmd/vm.c

index 5aeed37..2c831b0 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: vm.c,v 1.13 2017/04/25 06:44:35 reyk Exp $    */
+/*     $OpenBSD: vm.c,v 1.14 2017/05/02 02:58:24 mlarkin Exp $ */
 
 /*
  * Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
@@ -133,6 +133,12 @@ static const struct vcpu_reg_state vcpu_init_flat32 = {
        .vrs_idtr = { 0x0, 0xFFFF, 0x0, 0x0},
        .vrs_sregs[VCPU_REGS_LDTR] = { 0x0, 0xFFFF, 0x0082, 0x0},
        .vrs_sregs[VCPU_REGS_TR] = { 0x0, 0xFFFF, 0x008B, 0x0},
+       .vrs_msrs[VCPU_REGS_EFER] = 0ULL,
+       .vrs_msrs[VCPU_REGS_STAR] = 0ULL,
+       .vrs_msrs[VCPU_REGS_LSTAR] = 0ULL,
+       .vrs_msrs[VCPU_REGS_CSTAR] = 0ULL,
+       .vrs_msrs[VCPU_REGS_SFMASK] = 0ULL,
+       .vrs_msrs[VCPU_REGS_KGSBASE] = 0ULL
 };
 
 /*
@@ -161,6 +167,12 @@ static const struct vcpu_reg_state vcpu_init_flat16 = {
        .vrs_idtr = { 0x0, 0xFFFF, 0x0, 0x0},
        .vrs_sregs[VCPU_REGS_LDTR] = { 0x0, 0xFFFF, 0x0082, 0x0},
        .vrs_sregs[VCPU_REGS_TR] = { 0x0, 0xFFFF, 0x008B, 0x0},
+       .vrs_msrs[VCPU_REGS_EFER] = 0ULL,
+       .vrs_msrs[VCPU_REGS_STAR] = 0ULL,
+       .vrs_msrs[VCPU_REGS_LSTAR] = 0ULL,
+       .vrs_msrs[VCPU_REGS_CSTAR] = 0ULL,
+       .vrs_msrs[VCPU_REGS_SFMASK] = 0ULL,
+       .vrs_msrs[VCPU_REGS_KGSBASE] = 0ULL
 };
 
 /*