On Wed, Jun 27, 2018 at 05:01:04AM -0500, Ax0n wrote:
> Trying to spin up a diskless vmm with the latest bsd.rd:
> [axon@transient vmm]$ doas vmctl start foo -c -b /bsd.rd -m 512m -i 1 -n
> local
> vmctl: starting without disks
> Connected to /dev/ttyp3 (speed 115200)
> 
> [EOT]
> [axon@transient vmm]$ dmesg | tail
> Guest EPTP = 0x112d3001e
> vmm_alloc_vpid: allocated VPID/ASID 1
> vmm_fpurestore: guest attempted to set invalid bits in xcr0
> vmm_free_vpid: freed VPID/ASID 1
> vm_impl_init_vmx: created vm_map @ 0xffff800000730600
> vm_resetcpu: resetting vm 4 vcpu 0 to power on defaults
> Guest EPTP = 0x112d3001e
> vmm_alloc_vpid: allocated VPID/ASID 1
> vmm_fpurestore: guest attempted to set invalid bits in xcr0

This is the problem, although we don't know why it would be happening. Can
you apply the following diff and give me the new dmesg line? This will tell
me what the guest is trying to do.

I'll also apply this to -current, so you could also just update your tree and
you'll get the diff that way also.

-ml

Index: vmm.c
===================================================================
RCS file: /cvs/src/sys/arch/amd64/amd64/vmm.c,v
retrieving revision 1.202
diff -u -p -a -u -r1.202 vmm.c
--- vmm.c       22 Jun 2018 05:21:45 -0000      1.202
+++ vmm.c       29 Jun 2018 04:47:32 -0000
@@ -3829,8 +3829,9 @@ vmm_fpurestore(struct vcpu *vcpu)
        if (vcpu->vc_fpuinited) {
                /* Restore guest XCR0 and FPU context */
                if (vcpu->vc_gueststate.vg_xcr0 & ~xsave_mask) {
-                       DPRINTF("%s: guest attempted to set invalid %s\n",
-                           __func__, "bits in xcr0");
+                       DPRINTF("%s: guest attempted to set invalid bits in "
+                           "xcr0 (guest %%xcr0=0x%llx, host mask=0x%llx)\n",
+                           __func__, vcpu->vc_gueststate.vg_xcr0, ~xsave_mask);
                        return EINVAL;
                }
 

Reply via email to