Re: vmm uvm_fault in vmware player/workstation when Intel VT/AMD-v not enabled

2015-12-06 Thread Mike Larkin
On Tue, Nov 24, 2015 at 11:02:30PM +0100, Erwin van Maanen wrote:
> Hello Misc, 
> 
> I was playing around with the new vmm in the bsd snapshot of Nov 23 under 
> VMWare Workstation. 
> And when enabling it, i forget to enabled "Virtualize Intel VT-x/EPT or 
> AMD-V/RVI" option in VMWare workstation an i get an uvm_fault: 
> 
> uvm_fault(0xff007f549f00, 0x60, 0, 1) -> e
> kernel: page fault trap, code=0
> Stopped at   vmmioctl+0x18:  movl   0x60(%rcx),%r8d
> ddb{3}>
> 
> After enabling "Virtualize Intel VT-x/EPT or AMD-V/RVI" all works fine afaik.
> It would be nice to get a little error saying, Intel VT/AMD-V not available 
> or something like that instead of the above.
> 
> Erwin

Following up on old emails - I believe this was already fixed by a later commit,
please let us know if this is not the case.

-ml

> 
> -- dmesg --
> OpenBSD 5.8-current (GENERIC.MP) #1652: Mon Nov 23 11:46:59 MST 2015
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 2130640896 (2031MB)
> avail mem = 2061979648 (1966MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (556 entries)
> bios0: vendor Phoenix Technologies LTD version "6.00" date 05/20/2014
> bios0: VMware, Inc. VMware Virtual Platform
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S1 S4 S5
> acpi0: tables DSDT FACP BOOT APIC MCFG SRAT HPET WAET
> acpi0: wakeup devices PCI0(S3) USB_(S1) P2P0(S3) S1F0(S3) S2F0(S3) S3F0(S3) 
> S4F0(S3) S5F0(S3) S6F0(S3) S7F0(S3) S8F0(S3) S9F0(S3) S10F(S3) S11F(S3) 
> S12F(S3) S13F(S3) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.99 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> cpu0: 256KB 64b/line 8-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 65MHz
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.55 MHz
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 2 (application processor)
> cpu2: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.50 MHz
> cpu2: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> cpu2: 256KB 64b/line 8-way L2 cache
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 3 (application processor)
> cpu3: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.45 MHz
> cpu3: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> cpu3: 256KB 64b/line 8-way L2 cache
> cpu3: smt 0, core 3, package 0
> ioapic0 at mainbus0: apid 4 pa 0xfec0, version 11, 24 pins
> acpimcfg0 at acpi0 addr 0xf000, bus 0-127
> acpihpet0 at acpi0: 14318179 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpicpu0 at acpi0: C1(@1 halt!)
> acpicpu1 at acpi0: C1(@1 halt!)
> acpicpu2 at acpi0: C1(@1 halt!)
> acpicpu3 at acpi0: C1(@1 halt!)
> acpibat0 at acpi0: BAT1 not present
> acpibat1 at acpi0: BAT2 not present
> acpiac0 at acpi0: AC unit online
> acpibtn0 at acpi0: SLPB
> acpibtn1 at acpi0: LID_
> pvbus0 at mainbus0: VMware
> vmt0 at pvbus0
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x01
> ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x01
> pci1 at ppb0 bus 1
> pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x08
> pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 
> configured to compatibility, channel 1 configured to compatibility
> wd0 at pciide0 channel 0 drive 0: 
> wd0: 64-sector PIO, LBA, 12288MB, 25165824 sectors
> wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
> atapiscsi0 at pciide0 channel 1 drive 0
> scsibus1 at atapiscsi0: 2 targets
> cd0 at scsibus1 targ 0 lun 0:  ATAPI 
> 5/cdrom 

Re: vmm uvm_fault in vmware player/workstation when Intel VT/AMD-v not enabled

2015-12-06 Thread Mike Larkin
On Sun, Dec 06, 2015 at 10:02:50AM -0800, Mike Larkin wrote:
> On Tue, Nov 24, 2015 at 11:02:30PM +0100, Erwin van Maanen wrote:
> > Hello Misc, 
> > 
> > I was playing around with the new vmm in the bsd snapshot of Nov 23 under 
> > VMWare Workstation. 
> > And when enabling it, i forget to enabled "Virtualize Intel VT-x/EPT or 
> > AMD-V/RVI" option in VMWare workstation an i get an uvm_fault: 
> > 
> > uvm_fault(0xff007f549f00, 0x60, 0, 1) -> e
> > kernel: page fault trap, code=0
> > Stopped at   vmmioctl+0x18:  movl   0x60(%rcx),%r8d
> > ddb{3}>
> > 
> > After enabling "Virtualize Intel VT-x/EPT or AMD-V/RVI" all works fine 
> > afaik.
> > It would be nice to get a little error saying, Intel VT/AMD-V not available 
> > or something like that instead of the above.
> > 
> > Erwin
> 
> Following up on old emails - I believe this was already fixed by a later 
> commit,
> please let us know if this is not the case.

Actually after looking a bit, it looks like this wasn't fixed. I'll commit the
fix presently.

-ml

> 
> -ml
> 
> > 
> > -- dmesg --
> > OpenBSD 5.8-current (GENERIC.MP) #1652: Mon Nov 23 11:46:59 MST 2015
> > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > real mem = 2130640896 (2031MB)
> > avail mem = 2061979648 (1966MB)
> > mpath0 at root
> > scsibus0 at mpath0: 256 targets
> > mainbus0 at root
> > bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (556 entries)
> > bios0: vendor Phoenix Technologies LTD version "6.00" date 05/20/2014
> > bios0: VMware, Inc. VMware Virtual Platform
> > acpi0 at bios0: rev 2
> > acpi0: sleep states S0 S1 S4 S5
> > acpi0: tables DSDT FACP BOOT APIC MCFG SRAT HPET WAET
> > acpi0: wakeup devices PCI0(S3) USB_(S1) P2P0(S3) S1F0(S3) S2F0(S3) S3F0(S3) 
> > S4F0(S3) S5F0(S3) S6F0(S3) S7F0(S3) S8F0(S3) S9F0(S3) S10F(S3) S11F(S3) 
> > S12F(S3) S13F(S3) [...]
> > acpitimer0 at acpi0: 3579545 Hz, 24 bits
> > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> > cpu0 at mainbus0: apid 0 (boot processor)
> > cpu0: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.99 MHz
> > cpu0: 
> > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> > cpu0: 256KB 64b/line 8-way L2 cache
> > cpu0: smt 0, core 0, package 0
> > mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> > cpu0: apic clock running at 65MHz
> > cpu1 at mainbus0: apid 1 (application processor)
> > cpu1: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.55 MHz
> > cpu1: 
> > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> > cpu1: 256KB 64b/line 8-way L2 cache
> > cpu1: smt 0, core 1, package 0
> > cpu2 at mainbus0: apid 2 (application processor)
> > cpu2: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.50 MHz
> > cpu2: 
> > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> > cpu2: 256KB 64b/line 8-way L2 cache
> > cpu2: smt 0, core 2, package 0
> > cpu3 at mainbus0: apid 3 (application processor)
> > cpu3: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.45 MHz
> > cpu3: 
> > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> > cpu3: 256KB 64b/line 8-way L2 cache
> > cpu3: smt 0, core 3, package 0
> > ioapic0 at mainbus0: apid 4 pa 0xfec0, version 11, 24 pins
> > acpimcfg0 at acpi0 addr 0xf000, bus 0-127
> > acpihpet0 at acpi0: 14318179 Hz
> > acpiprt0 at acpi0: bus 0 (PCI0)
> > acpicpu0 at acpi0: C1(@1 halt!)
> > acpicpu1 at acpi0: C1(@1 halt!)
> > acpicpu2 at acpi0: C1(@1 halt!)
> > acpicpu3 at acpi0: C1(@1 halt!)
> > acpibat0 at acpi0: BAT1 not present
> > acpibat1 at acpi0: BAT2 not present
> > acpiac0 at acpi0: AC unit online
> > acpibtn0 at acpi0: SLPB
> > acpibtn1 at acpi0: LID_
> > pvbus0 at mainbus0: VMware
> > vmt0 at pvbus0
> > pci0 at mainbus0 bus 0
> > pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x01
> > ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x01
> > pci1 at ppb0 bus 1
> > pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x08
> > pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 
> > 0 configured to 

Re: vmm uvm_fault in vmware player/workstation when Intel VT/AMD-v not enabled

2015-12-06 Thread _rest _rest
Tried again with "Virtualize Intel VT-x/EPT or AMD-V/RVI" disabled on a freshly 
built current.
Now i get a nice error:

# vmd
fatal in vmd: /dev/vmm: Operation not supported by device

- Oorspronkelijk bericht - 

Van: "Mike Larkin" <mlar...@azathoth.net> 
Aan: "Erwin van Maanen" <open...@acmeweb.nl> 
Cc: misc@openbsd.org 
Verzonden: Zondag 6 december 2015 19:12:18 
Onderwerp: Re: vmm uvm_fault in vmware player/workstation when Intel VT/AMD-v 
not enabled 

On Sun, Dec 06, 2015 at 10:02:50AM -0800, Mike Larkin wrote: 
> On Tue, Nov 24, 2015 at 11:02:30PM +0100, Erwin van Maanen wrote: 
> > Hello Misc, 
> > 
> > I was playing around with the new vmm in the bsd snapshot of Nov 23 under 
> > VMWare Workstation. 
> > And when enabling it, i forget to enabled "Virtualize Intel VT-x/EPT or 
> > AMD-V/RVI" option in VMWare workstation an i get an uvm_fault: 
> > 
> > uvm_fault(0xff007f549f00, 0x60, 0, 1) -> e 
> > kernel: page fault trap, code=0 
> > Stopped at vmmioctl+0x18: movl 0x60(%rcx),%r8d 
> > ddb{3}> 
> > 
> > After enabling "Virtualize Intel VT-x/EPT or AMD-V/RVI" all works fine 
> > afaik. 
> > It would be nice to get a little error saying, Intel VT/AMD-V not available 
> > or something like that instead of the above. 
> > 
> > Erwin 
> 
> Following up on old emails - I believe this was already fixed by a later 
> commit, 
> please let us know if this is not the case. 

Actually after looking a bit, it looks like this wasn't fixed. I'll commit the 
fix presently. 

-ml 

> 
> -ml 
> 
> > 
> > -- dmesg -- 
> > OpenBSD 5.8-current (GENERIC.MP) #1652: Mon Nov 23 11:46:59 MST 2015 
> > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP 
> > real mem = 2130640896 (2031MB) 
> > avail mem = 2061979648 (1966MB) 
> > mpath0 at root 
> > scsibus0 at mpath0: 256 targets 
> > mainbus0 at root 
> > bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (556 entries) 
> > bios0: vendor Phoenix Technologies LTD version "6.00" date 05/20/2014 
> > bios0: VMware, Inc. VMware Virtual Platform 
> > acpi0 at bios0: rev 2 
> > acpi0: sleep states S0 S1 S4 S5 
> > acpi0: tables DSDT FACP BOOT APIC MCFG SRAT HPET WAET 
> > acpi0: wakeup devices PCI0(S3) USB_(S1) P2P0(S3) S1F0(S3) S2F0(S3) S3F0(S3) 
> > S4F0(S3) S5F0(S3) S6F0(S3) S7F0(S3) S8F0(S3) S9F0(S3) S10F(S3) S11F(S3) 
> > S12F(S3) S13F(S3) [...] 
> > acpitimer0 at acpi0: 3579545 Hz, 24 bits 
> > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat 
> > cpu0 at mainbus0: apid 0 (boot processor) 
> > cpu0: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.99 MHz 
> > cpu0: 
> > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> >  
> > cpu0: 256KB 64b/line 8-way L2 cache 
> > cpu0: smt 0, core 0, package 0 
> > mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges 
> > cpu0: apic clock running at 65MHz 
> > cpu1 at mainbus0: apid 1 (application processor) 
> > cpu1: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.55 MHz 
> > cpu1: 
> > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> >  
> > cpu1: 256KB 64b/line 8-way L2 cache 
> > cpu1: smt 0, core 1, package 0 
> > cpu2 at mainbus0: apid 2 (application processor) 
> > cpu2: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.50 MHz 
> > cpu2: 
> > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> >  
> > cpu2: 256KB 64b/line 8-way L2 cache 
> > cpu2: smt 0, core 2, package 0 
> > cpu3 at mainbus0: apid 3 (application processor) 
> > cpu3: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.45 MHz 
> > cpu3: 
> > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1

Re: vmm uvm_fault in vmware player/workstation when Intel VT/AMD-v not enabled

2015-12-06 Thread Mike Larkin
On Mon, Dec 07, 2015 at 01:05:46AM +0100, _rest _rest wrote:
> Tried again with "Virtualize Intel VT-x/EPT or AMD-V/RVI" disabled on a 
> freshly built current.
> Now i get a nice error:
> 
> # vmd
> fatal in vmd: /dev/vmm: Operation not supported by device
> 

Thanks, that's the expected behavior.

-ml

> - Oorspronkelijk bericht - 
> 
> Van: "Mike Larkin" <mlar...@azathoth.net> 
> Aan: "Erwin van Maanen" <open...@acmeweb.nl> 
> Cc: misc@openbsd.org 
> Verzonden: Zondag 6 december 2015 19:12:18 
> Onderwerp: Re: vmm uvm_fault in vmware player/workstation when Intel VT/AMD-v 
> not enabled 
> 
> On Sun, Dec 06, 2015 at 10:02:50AM -0800, Mike Larkin wrote: 
> > On Tue, Nov 24, 2015 at 11:02:30PM +0100, Erwin van Maanen wrote: 
> > > Hello Misc, 
> > > 
> > > I was playing around with the new vmm in the bsd snapshot of Nov 23 under 
> > > VMWare Workstation. 
> > > And when enabling it, i forget to enabled "Virtualize Intel VT-x/EPT or 
> > > AMD-V/RVI" option in VMWare workstation an i get an uvm_fault: 
> > > 
> > > uvm_fault(0xff007f549f00, 0x60, 0, 1) -> e 
> > > kernel: page fault trap, code=0 
> > > Stopped at vmmioctl+0x18: movl 0x60(%rcx),%r8d 
> > > ddb{3}> 
> > > 
> > > After enabling "Virtualize Intel VT-x/EPT or AMD-V/RVI" all works fine 
> > > afaik. 
> > > It would be nice to get a little error saying, Intel VT/AMD-V not 
> > > available or something like that instead of the above. 
> > > 
> > > Erwin 
> > 
> > Following up on old emails - I believe this was already fixed by a later 
> > commit, 
> > please let us know if this is not the case. 
> 
> Actually after looking a bit, it looks like this wasn't fixed. I'll commit 
> the 
> fix presently. 
> 
> -ml 
> 
> > 
> > -ml 
> > 
> > > 
> > > -- dmesg -- 
> > > OpenBSD 5.8-current (GENERIC.MP) #1652: Mon Nov 23 11:46:59 MST 2015 
> > > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP 
> > > real mem = 2130640896 (2031MB) 
> > > avail mem = 2061979648 (1966MB) 
> > > mpath0 at root 
> > > scsibus0 at mpath0: 256 targets 
> > > mainbus0 at root 
> > > bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (556 entries) 
> > > bios0: vendor Phoenix Technologies LTD version "6.00" date 05/20/2014 
> > > bios0: VMware, Inc. VMware Virtual Platform 
> > > acpi0 at bios0: rev 2 
> > > acpi0: sleep states S0 S1 S4 S5 
> > > acpi0: tables DSDT FACP BOOT APIC MCFG SRAT HPET WAET 
> > > acpi0: wakeup devices PCI0(S3) USB_(S1) P2P0(S3) S1F0(S3) S2F0(S3) 
> > > S3F0(S3) S4F0(S3) S5F0(S3) S6F0(S3) S7F0(S3) S8F0(S3) S9F0(S3) S10F(S3) 
> > > S11F(S3) S12F(S3) S13F(S3) [...] 
> > > acpitimer0 at acpi0: 3579545 Hz, 24 bits 
> > > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat 
> > > cpu0 at mainbus0: apid 0 (boot processor) 
> > > cpu0: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.99 MHz 
> > > cpu0: 
> > > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> > >  
> > > cpu0: 256KB 64b/line 8-way L2 cache 
> > > cpu0: smt 0, core 0, package 0 
> > > mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges 
> > > cpu0: apic clock running at 65MHz 
> > > cpu1 at mainbus0: apid 1 (application processor) 
> > > cpu1: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.55 MHz 
> > > cpu1: 
> > > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> > >  
> > > cpu1: 256KB 64b/line 8-way L2 cache 
> > > cpu1: smt 0, core 1, package 0 
> > > cpu2 at mainbus0: apid 2 (application processor) 
> > > cpu2: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.50 MHz 
> > > cpu2: 
> > > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,

Re: vmm uvm_fault in vmware player/workstation when Intel VT/AMD-v not enabled

2015-11-24 Thread Mike Larkin
On Tue, Nov 24, 2015 at 11:02:30PM +0100, Erwin van Maanen wrote:
> Hello Misc, 
> 
> I was playing around with the new vmm in the bsd snapshot of Nov 23 under 
> VMWare Workstation. 
> And when enabling it, i forget to enabled "Virtualize Intel VT-x/EPT or 
> AMD-V/RVI" option in VMWare workstation an i get an uvm_fault: 
> 
> uvm_fault(0xff007f549f00, 0x60, 0, 1) -> e
> kernel: page fault trap, code=0
> Stopped at   vmmioctl+0x18:  movl   0x60(%rcx),%r8d
> ddb{3}>
> 
> After enabling "Virtualize Intel VT-x/EPT or AMD-V/RVI" all works fine afaik.
> It would be nice to get a little error saying, Intel VT/AMD-V not available 
> or something like that instead of the above.
> 
> Erwin

Known issue. I'll be fixing this shortly.

-ml

> 
> -- dmesg --
> OpenBSD 5.8-current (GENERIC.MP) #1652: Mon Nov 23 11:46:59 MST 2015
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 2130640896 (2031MB)
> avail mem = 2061979648 (1966MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (556 entries)
> bios0: vendor Phoenix Technologies LTD version "6.00" date 05/20/2014
> bios0: VMware, Inc. VMware Virtual Platform
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S1 S4 S5
> acpi0: tables DSDT FACP BOOT APIC MCFG SRAT HPET WAET
> acpi0: wakeup devices PCI0(S3) USB_(S1) P2P0(S3) S1F0(S3) S2F0(S3) S3F0(S3) 
> S4F0(S3) S5F0(S3) S6F0(S3) S7F0(S3) S8F0(S3) S9F0(S3) S10F(S3) S11F(S3) 
> S12F(S3) S13F(S3) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.99 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> cpu0: 256KB 64b/line 8-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 65MHz
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.55 MHz
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 2 (application processor)
> cpu2: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.50 MHz
> cpu2: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> cpu2: 256KB 64b/line 8-way L2 cache
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 3 (application processor)
> cpu3: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.45 MHz
> cpu3: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> cpu3: 256KB 64b/line 8-way L2 cache
> cpu3: smt 0, core 3, package 0
> ioapic0 at mainbus0: apid 4 pa 0xfec0, version 11, 24 pins
> acpimcfg0 at acpi0 addr 0xf000, bus 0-127
> acpihpet0 at acpi0: 14318179 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpicpu0 at acpi0: C1(@1 halt!)
> acpicpu1 at acpi0: C1(@1 halt!)
> acpicpu2 at acpi0: C1(@1 halt!)
> acpicpu3 at acpi0: C1(@1 halt!)
> acpibat0 at acpi0: BAT1 not present
> acpibat1 at acpi0: BAT2 not present
> acpiac0 at acpi0: AC unit online
> acpibtn0 at acpi0: SLPB
> acpibtn1 at acpi0: LID_
> pvbus0 at mainbus0: VMware
> vmt0 at pvbus0
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x01
> ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x01
> pci1 at ppb0 bus 1
> pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x08
> pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 
> configured to compatibility, channel 1 configured to compatibility
> wd0 at pciide0 channel 0 drive 0: 
> wd0: 64-sector PIO, LBA, 12288MB, 25165824 sectors
> wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
> atapiscsi0 at pciide0 channel 1 drive 0
> scsibus1 at atapiscsi0: 2 targets
> cd0 at scsibus1 targ 0 lun 0:  ATAPI 
> 5/cdrom removable
> cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
> piixpm0 at pci0 

vmm uvm_fault in vmware player/workstation when Intel VT/AMD-v not enabled

2015-11-24 Thread Erwin van Maanen
Hello Misc, 

I was playing around with the new vmm in the bsd snapshot of Nov 23 under 
VMWare Workstation. 
And when enabling it, i forget to enabled "Virtualize Intel VT-x/EPT or 
AMD-V/RVI" option in VMWare workstation an i get an uvm_fault: 

uvm_fault(0xff007f549f00, 0x60, 0, 1) -> e
kernel: page fault trap, code=0
Stopped at   vmmioctl+0x18:  movl   0x60(%rcx),%r8d
ddb{3}>

After enabling "Virtualize Intel VT-x/EPT or AMD-V/RVI" all works fine afaik.
It would be nice to get a little error saying, Intel VT/AMD-V not available or 
something like that instead of the above.

Erwin

-- dmesg --
OpenBSD 5.8-current (GENERIC.MP) #1652: Mon Nov 23 11:46:59 MST 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 2130640896 (2031MB)
avail mem = 2061979648 (1966MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (556 entries)
bios0: vendor Phoenix Technologies LTD version "6.00" date 05/20/2014
bios0: VMware, Inc. VMware Virtual Platform
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP BOOT APIC MCFG SRAT HPET WAET
acpi0: wakeup devices PCI0(S3) USB_(S1) P2P0(S3) S1F0(S3) S2F0(S3) S3F0(S3) 
S4F0(S3) S5F0(S3) S6F0(S3) S7F0(S3) S8F0(S3) S9F0(S3) S10F(S3) S11F(S3) 
S12F(S3) S13F(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.99 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 65MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.55 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.50 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz, 3391.45 MHz
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 4 pa 0xfec0, version 11, 24 pins
acpimcfg0 at acpi0 addr 0xf000, bus 0-127
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0: C1(@1 halt!)
acpicpu1 at acpi0: C1(@1 halt!)
acpicpu2 at acpi0: C1(@1 halt!)
acpicpu3 at acpi0: C1(@1 halt!)
acpibat0 at acpi0: BAT1 not present
acpibat1 at acpi0: BAT2 not present
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: LID_
pvbus0 at mainbus0: VMware
vmt0 at pvbus0
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x01
ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x01
pci1 at ppb0 bus 1
pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x08
pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 
configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: 
wd0: 64-sector PIO, LBA, 12288MB, 25165824 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
atapiscsi0 at pciide0 channel 1 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0:  ATAPI 5/cdrom 
removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
piixpm0 at pci0 dev 7 function 3 "Intel 82371AB Power" rev 0x08: SMBus disabled
"VMware VMCI" rev 0x10 at pci0 dev 7 function 7 not configured
vga1 at pci0 dev 15 function 0 "VMware SVGA II" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
mpi0