NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/54058: vmx(4): fail to device enable command when the number of vCPUs is not a power of two.



>Number:         54058
>Category:       kern
>Synopsis:       vmx(4): fail to device enable command when the number of vCPUs is not a power of two.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 13 03:20:00 +0000 2019
>Originator:     Kimihiro Nonaka
>Release:        NetBSD/amd64 8.0_STABLE (20190311)
>Organization:
>Environment:
NetBSD netbsd 8.0_STABLE NetBSD 8.0_STABLE (NBSERVER) #58: Mon Mar 11 11:58:08 JST 2019  nonaka@netbsd:/exports/snapshot/NetBSD/8-STABLE/obj.NetBSD-amd64/amd64/sys/arch/amd64/compile/NBSERVER amd64
>Description:
When I changed the number of vCPUs of VM on ESXi to 6, vmx(4) can not be used by outputting the message "device enable command failed!". When vCPU is a power of 2 such as 4 or 8, vmx(4) can be used without any problem.

dmesg (6 vCPU):
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
   2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
   2018, 2019 The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
   The Regents of the University of California.  All rights reserved.

NetBSD 8.0_STABLE (NBSERVER) #58: Mon Mar 11 11:58:08 JST 2019
	nonaka@netbsd:/exports/snapshot/NetBSD/8-STABLE/obj.NetBSD-amd64/amd64/sys/arch/amd64/compile/NBSERVER
total memory = 24575 MB
avail memory = 23838 MB
cpu_rng: RDSEED
rnd: seeded with 128 bits
timecounter: Timecounters tick every 10.000 msec
NET_MPSAFE enabled
Kernelized RAIDframe activated
running cgd selftest aes-xts-256 aes-xts-512 done
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
VMware, Inc. VMware Virtual Platform (None)
mainbus0 (root)
ACPI: RSDP 0x00000000000F6A10 000024 (v02 PTLTD )
ACPI: XSDT 0x00000000BFEEF8E5 00005C (v01 INTEL  440BX    06040000 VMW  01324272)
ACPI: FACP 0x00000000BFEFEE73 0000F4 (v04 INTEL  440BX    06040000 PTL  000F4240)
ACPI: DSDT 0x00000000BFEEFBE3 00F290 (v01 PTLTD  Custom   06040000 MSFT 03000001)
ACPI: FACS 0x00000000BFEFFFC0 000040
ACPI: FACS 0x00000000BFEFFFC0 000040
ACPI: BOOT 0x00000000BFEEFBBB 000028 (v01 PTLTD  $SBFTBL$ 06040000  LTP 00000001)
ACPI: APIC 0x00000000BFEEFB25 000096 (v01 PTLTD  ? APIC   06040000  LTP 00000000)
ACPI: MCFG 0x00000000BFEEFAE9 00003C (v01 PTLTD  $PCITBL$ 06040000  LTP 00000001)
ACPI: SRAT 0x00000000BFEEF9E1 000108 (v02 VMWARE MEMPLUG  06040000 VMW  00000001)
ACPI: HPET 0x00000000BFEEF9A9 000038 (v01 VMWARE VMW HPET 06040000 VMW  00000001)
ACPI: WAET 0x00000000BFEEF981 000028 (v01 VMWARE VMW WAET 06040000 VMW  00000001)
ACPI: 1 ACPI AML tables successfully acquired and loaded
ioapic0 at mainbus0 apid 1: pa 0xfec00000, version 0x20, 24 pins
cpu0 at mainbus0 apid 0
cpu0: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz, id 0x506e3
cpu0: package 0, core 0, smt 0
cpu1 at mainbus0 apid 2
cpu1: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz, id 0x506e3
cpu1: package 2, core 0, smt 0
cpu2 at mainbus0 apid 4
cpu2: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz, id 0x506e3
cpu2: package 4, core 0, smt 0
cpu3 at mainbus0 apid 6
cpu3: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz, id 0x506e3
cpu3: package 6, core 0, smt 0
cpu4 at mainbus0 apid 8
cpu4: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz, id 0x506e3
cpu4: package 8, core 0, smt 0
cpu5 at mainbus0 apid 10
cpu5: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz, id 0x506e3
cpu5: package 10, core 0, smt 0
acpi0 at mainbus0: Intel ACPICA 20170303
acpi0: X/RSDT: OemId <INTEL ,440BX   ,06040000>, AslId <VMW ,01324272>
acpi0: MCFG: segment 0, bus 0-127, address 0x00000000f0000000
acpi0: SCI interrupting at int 9
timecounter: Timecounter "ACPI-Safe" frequency 3579545 Hz quality 900
hpet0 at acpi0: high precision event timer (mem 0xfed00000-0xfed00400)
timecounter: Timecounter "hpet0" frequency 14318180 Hz quality 2000
MBRD (PNP0C02) at acpi0 not configured
PIC (PNP0001) at acpi0 not configured
attimer1 at acpi0 (TIME, PNP0100): io 0x40-0x43 irq 0
pcppi1 at acpi0 (SPKR, PNP0800): io 0x61
spkr0 at pcppi1: PC Speaker
midi0 at pcppi1: PC speaker
sysbeep0 at pcppi1
pckbc1 at acpi0 (KBC, PNP0303) (kbd port): io 0x60,0x64 irq 1
pckbc2 at acpi0 (MOUS, VMW0003) (aux port): irq 12
COMA (PNP0501) at acpi0 not configured
EXPL (PNP0C02) at acpi0 not configured
acpiacad0 at acpi0 (ACAD, ACPI0003-1): ACPI AC Adapter
ACPI: Enabled 2 GPEs in block 00 to 0F
attimer1: attached to pcppi1
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc1 (aux slot)
pckbc1: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0: vendor 8086 product 7190 (rev. 0x01)
ppb0 at pci0 dev 1 function 0: vendor 8086 product 7191 (rev. 0x01)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
pcib0 at pci0 dev 7 function 0: vendor 8086 product 7110 (rev. 0x08)
piixide0 at pci0 dev 7 function 1: Intel 82371AB IDE controller (PIIX4) (rev. 0x01)
piixide0: bus-master DMA support present
piixide0: primary channel configured to compatibility mode
piixide0: primary channel interrupting at ioapic0 pin 14
atabus0 at piixide0 channel 0
piixide0: secondary channel configured to compatibility mode
piixide0: secondary channel interrupting at ioapic0 pin 15
atabus1 at piixide0 channel 1
piixpm0 at pci0 dev 7 function 3: vendor 8086 product 7113 (rev. 0x08)
timecounter: Timecounter "piixpm0" frequency 3579545 Hz quality 1000
piixpm0: 24-bit timer
piixpm0: SMBus disabled
vendor 15ad product 0740 (miscellaneous system, revision 0x10) at pci0 dev 7 function 7 not configured
vga0 at pci0 dev 15 function 0: vendor 15ad product 0405 (rev. 0x00)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
drm at vga0 not configured
ppb1 at pci0 dev 17 function 0: vendor 15ad product 0790 (rev. 0x02)
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
ahcisata0 at pci2 dev 2 function 0: vendor 15ad product 07e0 (rev. 0x00)
ahcisata0: interrupting at ioapic0 pin 16
ahcisata0: 64-bit DMA
ahcisata0: AHCI revision 1.30, 30 ports, 32 slots, CAP 0xc1341f1d<SAM,ISS=0x3=Gen3,SCLO,SNCQ,S64A>
atabus2 at ahcisata0 channel 0
atabus3 at ahcisata0 channel 1
atabus4 at ahcisata0 channel 2
atabus5 at ahcisata0 channel 3
atabus6 at ahcisata0 channel 4
atabus7 at ahcisata0 channel 5
atabus8 at ahcisata0 channel 6
atabus9 at ahcisata0 channel 7
atabus10 at ahcisata0 channel 8
atabus11 at ahcisata0 channel 9
atabus12 at ahcisata0 channel 10
atabus13 at ahcisata0 channel 11
atabus14 at ahcisata0 channel 12
atabus15 at ahcisata0 channel 13
atabus16 at ahcisata0 channel 14
atabus17 at ahcisata0 channel 15
atabus18 at ahcisata0 channel 16
atabus19 at ahcisata0 channel 17
atabus20 at ahcisata0 channel 18
atabus21 at ahcisata0 channel 19
atabus22 at ahcisata0 channel 20
atabus23 at ahcisata0 channel 21
atabus24 at ahcisata0 channel 22
atabus25 at ahcisata0 channel 23
atabus26 at ahcisata0 channel 24
atabus27 at ahcisata0 channel 25
atabus28 at ahcisata0 channel 26
atabus29 at ahcisata0 channel 27
atabus30 at ahcisata0 channel 28
atabus31 at ahcisata0 channel 29
ppb2 at pci0 dev 21 function 0: vendor 15ad product 07a0 (rev. 0x01)
ppb2: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci3 at ppb2 bus 3
pci3: i/o space, memory space enabled, rd/line, wr/inv ok
nvme0 at pci3 dev 0 function 0: vendor 15ad product 07f0 (rev. 0x00)
nvme0: NVMe 1.0
nvme0: for admin queue interrupting at msix0 vec 0
nvme0: VMware Virtual NVMe Disk, firmware 1.0, serial VMWare NVME-0000
nvme0: for io queue 1 interrupting at msix0 vec 1 affinity to cpu0
nvme0: for io queue 2 interrupting at msix0 vec 2 affinity to cpu1
nvme0: for io queue 3 interrupting at msix0 vec 3 affinity to cpu2
nvme0: for io queue 4 interrupting at msix0 vec 4 affinity to cpu3
nvme0: for io queue 5 interrupting at msix0 vec 5 affinity to cpu4
nvme0: for io queue 6 interrupting at msix0 vec 6 affinity to cpu5
ld0 at nvme0 nsid 1
ld0: 216 GB, 28197 cyl, 255 head, 63 sec, 512 bytes/sect x 452984832 sectors
ppb3 at pci0 dev 21 function 1: vendor 15ad product 07a0 (rev. 0x01)
ppb3: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci4 at ppb3 bus 4
pci4: i/o space, memory space enabled, rd/line, wr/inv ok
ppb4 at pci0 dev 21 function 2: vendor 15ad product 07a0 (rev. 0x01)
ppb4: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci5 at ppb4 bus 5
pci5: i/o space, memory space enabled, rd/line, wr/inv ok
ppb5 at pci0 dev 21 function 3: vendor 15ad product 07a0 (rev. 0x01)
ppb5: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci6 at ppb5 bus 6
pci6: i/o space, memory space enabled, rd/line, wr/inv ok
ppb6 at pci0 dev 21 function 4: vendor 15ad product 07a0 (rev. 0x01)
ppb6: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci7 at ppb6 bus 7
pci7: i/o space, memory space enabled, rd/line, wr/inv ok
ppb7 at pci0 dev 21 function 5: vendor 15ad product 07a0 (rev. 0x01)
ppb7: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci8 at ppb7 bus 8
pci8: i/o space, memory space enabled, rd/line, wr/inv ok
ppb8 at pci0 dev 21 function 6: vendor 15ad product 07a0 (rev. 0x01)
ppb8: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci9 at ppb8 bus 9
pci9: i/o space, memory space enabled, rd/line, wr/inv ok
ppb9 at pci0 dev 21 function 7: vendor 15ad product 07a0 (rev. 0x01)
ppb9: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci10 at ppb9 bus 10
pci10: i/o space, memory space enabled, rd/line, wr/inv ok
ppb10 at pci0 dev 22 function 0: vendor 15ad product 07a0 (rev. 0x01)
ppb10: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci11 at ppb10 bus 11
pci11: i/o space, memory space enabled, rd/line, wr/inv ok
vmx0 at pci11 dev 0 function 0: vmxnet3 (rev. 0x01)
vmx0: Ethernet address 00:0c:29:c8:08:77
vmx0: tx interrupting at msix1 vec 0
vmx0: tx interrupting at msix1 vec 1
vmx0: tx interrupting at msix1 vec 2
vmx0: tx interrupting at msix1 vec 3
vmx0: tx interrupting at msix1 vec 4
vmx0: tx interrupting at msix1 vec 5
vmx0: rx interrupting at msix1 vec 6
allocated pic msix1 type edge pin 7 level 6 to cpu1 slot 1 idt entry 116
vmx0: rx interrupting at msix1 vec 7
allocated pic msix1 type edge pin 8 level 6 to cpu1 slot 2 idt entry 117
vmx0: rx interrupting at msix1 vec 8
allocated pic msix1 type edge pin 9 level 6 to cpu1 slot 3 idt entry 118
vmx0: rx interrupting at msix1 vec 9
allocated pic msix1 type edge pin 10 level 6 to cpu1 slot 4 idt entry 119
vmx0: rx interrupting at msix1 vec 10
allocated pic msix1 type edge pin 11 level 6 to cpu1 slot 5 idt entry 120
vmx0: rx interrupting at msix1 vec 11
allocated pic msix1 type edge pin 12 level 6 to cpu1 slot 6 idt entry 121
vmx0: event interrupting at msix1 vec 12
ppb11 at pci0 dev 22 function 1: vendor 15ad product 07a0 (rev. 0x01)
ppb11: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci12 at ppb11 bus 12
pci12: i/o space, memory space enabled, rd/line, wr/inv ok
ppb12 at pci0 dev 22 function 2: vendor 15ad product 07a0 (rev. 0x01)
ppb12: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci13 at ppb12 bus 13
pci13: i/o space, memory space enabled, rd/line, wr/inv ok
ppb13 at pci0 dev 22 function 3: vendor 15ad product 07a0 (rev. 0x01)
ppb13: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci14 at ppb13 bus 14
pci14: i/o space, memory space enabled, rd/line, wr/inv ok
ppb14 at pci0 dev 22 function 4: vendor 15ad product 07a0 (rev. 0x01)
ppb14: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci15 at ppb14 bus 15
pci15: i/o space, memory space enabled, rd/line, wr/inv ok
ppb15 at pci0 dev 22 function 5: vendor 15ad product 07a0 (rev. 0x01)
ppb15: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci16 at ppb15 bus 16
pci16: i/o space, memory space enabled, rd/line, wr/inv ok
ppb16 at pci0 dev 22 function 6: vendor 15ad product 07a0 (rev. 0x01)
ppb16: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci17 at ppb16 bus 17
pci17: i/o space, memory space enabled, rd/line, wr/inv ok
ppb17 at pci0 dev 22 function 7: vendor 15ad product 07a0 (rev. 0x01)
ppb17: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci18 at ppb17 bus 18
pci18: i/o space, memory space enabled, rd/line, wr/inv ok
ppb18 at pci0 dev 23 function 0: vendor 15ad product 07a0 (rev. 0x01)
ppb18: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci19 at ppb18 bus 19
pci19: i/o space, memory space enabled, rd/line, wr/inv ok
vmx1 at pci19 dev 0 function 0: vmxnet3 (rev. 0x01)
vmx1: Ethernet address 00:0c:29:c8:08:81
allocated pic msix2 type edge pin 0 level 6 to cpu1 slot 7 idt entry 122
vmx1: tx interrupting at msix2 vec 0
allocated pic msix2 type edge pin 1 level 6 to cpu1 slot 8 idt entry 123
vmx1: tx interrupting at msix2 vec 1
allocated pic msix2 type edge pin 2 level 6 to cpu1 slot 9 idt entry 124
vmx1: tx interrupting at msix2 vec 2
allocated pic msix2 type edge pin 3 level 6 to cpu1 slot 10 idt entry 125
vmx1: tx interrupting at msix2 vec 3
allocated pic msix2 type edge pin 4 level 6 to cpu1 slot 11 idt entry 126
vmx1: tx interrupting at msix2 vec 4
allocated pic msix2 type edge pin 5 level 6 to cpu1 slot 12 idt entry 127
vmx1: tx interrupting at msix2 vec 5
allocated pic msix2 type edge pin 6 level 6 to cpu1 slot 13 idt entry 129
vmx1: rx interrupting at msix2 vec 6
allocated pic msix2 type edge pin 7 level 6 to cpu1 slot 14 idt entry 130
vmx1: rx interrupting at msix2 vec 7
allocated pic msix2 type edge pin 8 level 6 to cpu1 slot 15 idt entry 131
vmx1: rx interrupting at msix2 vec 8
allocated pic msix2 type edge pin 9 level 6 to cpu1 slot 16 idt entry 132
vmx1: rx interrupting at msix2 vec 9
allocated pic msix2 type edge pin 10 level 6 to cpu1 slot 17 idt entry 133
vmx1: rx interrupting at msix2 vec 10
allocated pic msix2 type edge pin 11 level 6 to cpu1 slot 18 idt entry 134
vmx1: rx interrupting at msix2 vec 11
allocated pic msix2 type edge pin 12 level 6 to cpu1 slot 19 idt entry 135
vmx1: event interrupting at msix2 vec 12
ppb19 at pci0 dev 23 function 1: vendor 15ad product 07a0 (rev. 0x01)
ppb19: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci20 at ppb19 bus 20
pci20: i/o space, memory space enabled, rd/line, wr/inv ok
ppb20 at pci0 dev 23 function 2: vendor 15ad product 07a0 (rev. 0x01)
ppb20: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci21 at ppb20 bus 21
pci21: i/o space, memory space enabled, rd/line, wr/inv ok
ppb21 at pci0 dev 23 function 3: vendor 15ad product 07a0 (rev. 0x01)
ppb21: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci22 at ppb21 bus 22
pci22: i/o space, memory space enabled, rd/line, wr/inv ok
ppb22 at pci0 dev 23 function 4: vendor 15ad product 07a0 (rev. 0x01)
ppb22: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci23 at ppb22 bus 23
pci23: i/o space, memory space enabled, rd/line, wr/inv ok
ppb23 at pci0 dev 23 function 5: vendor 15ad product 07a0 (rev. 0x01)
ppb23: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci24 at ppb23 bus 24
pci24: i/o space, memory space enabled, rd/line, wr/inv ok
ppb24 at pci0 dev 23 function 6: vendor 15ad product 07a0 (rev. 0x01)
ppb24: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci25 at ppb24 bus 25
pci25: i/o space, memory space enabled, rd/line, wr/inv ok
ppb25 at pci0 dev 23 function 7: vendor 15ad product 07a0 (rev. 0x01)
ppb25: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci26 at ppb25 bus 26
pci26: i/o space, memory space enabled, rd/line, wr/inv ok
ppb26 at pci0 dev 24 function 0: vendor 15ad product 07a0 (rev. 0x01)
ppb26: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci27 at ppb26 bus 27
pci27: i/o space, memory space enabled, rd/line, wr/inv ok
ppb27 at pci0 dev 24 function 1: vendor 15ad product 07a0 (rev. 0x01)
ppb27: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci28 at ppb27 bus 28
pci28: i/o space, memory space enabled, rd/line, wr/inv ok
ppb28 at pci0 dev 24 function 2: vendor 15ad product 07a0 (rev. 0x01)
ppb28: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci29 at ppb28 bus 29
pci29: i/o space, memory space enabled, rd/line, wr/inv ok
ppb29 at pci0 dev 24 function 3: vendor 15ad product 07a0 (rev. 0x01)
ppb29: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci30 at ppb29 bus 30
pci30: i/o space, memory space enabled, rd/line, wr/inv ok
ppb30 at pci0 dev 24 function 4: vendor 15ad product 07a0 (rev. 0x01)
ppb30: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci31 at ppb30 bus 31
pci31: i/o space, memory space enabled, rd/line, wr/inv ok
ppb31 at pci0 dev 24 function 5: vendor 15ad product 07a0 (rev. 0x01)
ppb31: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci32 at ppb31 bus 32
pci32: i/o space, memory space enabled, rd/line, wr/inv ok
ppb32 at pci0 dev 24 function 6: vendor 15ad product 07a0 (rev. 0x01)
ppb32: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci33 at ppb32 bus 33
pci33: i/o space, memory space enabled, rd/line, wr/inv ok
ppb33 at pci0 dev 24 function 7: vendor 15ad product 07a0 (rev. 0x01)
ppb33: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x32 @ 5.0GT/s
pci34 at ppb33 bus 34
pci34: i/o space, memory space enabled, rd/line, wr/inv ok
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
acpicpu0 at cpu0: ACPI CPU
acpicpu0: C1: HLT, lat   0 us, pow     0 mW
vmt0 at cpu0
acpicpu1 at cpu1: ACPI CPU
acpicpu2 at cpu2: ACPI CPU
acpicpu3 at cpu3: ACPI CPU
acpicpu4 at cpu4: ACPI CPU
acpicpu5 at cpu5: ACPI CPU
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
ERROR: 52298 cycle TSC drift observed
acpiacad0: AC adapter online.
IPsec: Initialized Security Association Processing.
ahcisata0 port 0: device present, speed: 6.0Gb/s
atapibus0 at atabus2: 1 targets
cd0 at atapibus0 drive 0: <VMware Virtual SATA CDRW Drive, 00000000000000000001, 00000001> cdrom removable
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33) (using DMA)
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture, mmap
pad0: Virtual format configured - Format SLINEAR, precision 16, channels 2, frequency 44100
pad0: Latency: 139 milliseconds
spkr1 at audio0: PC Speaker (synthesized)
WARNING: 1 error while detecting hardware; check system log.
boot device: ld0
root on ld0a dumps on ld0b
root file system type: ffs
kern.module.path=/stand/amd64/8.0/modules
vmx0: device enable command failed!
vmx0: device enable command failed!
vmx0: cannot assign link-local address
vmx1: device enable command failed!
vmx1: device enable command failed!
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)

>How-To-Repeat:
Create a VM whose the number of vCPUs is not a power of two on VMware ESXi. Boot NetBSD 8 with it.
>Fix:
According to https://kb.vmware.com/s/article/2003484, make the size of the queue a power of two not exceeding the number of vCPUs.

diff --git a/sys/arch/x86/pci/if_vmx.c b/sys/arch/x86/pci/if_vmx.c
index 6b193c74df2..a06687e1665 100644
--- a/sys/arch/x86/pci/if_vmx.c
+++ b/sys/arch/x86/pci/if_vmx.c
@@ -395,6 +395,29 @@ void vmxnet3_dma_free(struct vmxnet3_softc *, struct vmxnet3_dma_alloc *);
 CFATTACH_DECL3_NEW(vmx, sizeof(struct vmxnet3_softc),
     vmxnet3_match, vmxnet3_attach, vmxnet3_detach, NULL, NULL, NULL, 0);
 
+/* round down to the nearest power of 2 */
+static int
+vmxnet3_calc_queue_size(int n)
+{
+	int v, q;
+
+	v = n;
+	while (v != 0) {
+		if (powerof2(n) != 0)
+			break;
+		v /= 2;
+		q = rounddown2(n, v);
+		if (q != 0) {
+			n = q;
+			break;
+		}
+	}
+	if (n == 0)
+		n = 1;
+
+	return n;
+}
+
 static inline void
 vmxnet3_write_bar0(struct vmxnet3_softc *sc, bus_size_t r, uint32_t v)
 {
@@ -520,8 +543,10 @@ vmxnet3_attach(device_t parent, device_t self, void *aux)
 	sc->vmx_mtx = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NET);
 	callout_init(&sc->vmx_tick, CALLOUT_MPSAFE);
 
-	sc->vmx_max_ntxqueues = ncpu;
-	sc->vmx_max_nrxqueues = ncpu;
+	sc->vmx_max_ntxqueues =
+	    vmxnet3_calc_queue_size(MIN(VMXNET3_MAX_TX_QUEUES, ncpu));
+	sc->vmx_max_nrxqueues =
+	    vmxnet3_calc_queue_size(MIN(VMXNET3_MAX_RX_QUEUES, ncpu));
 	sc->vmx_ntxdescs = 512;
 	sc->vmx_nrxdescs = 256;
 	sc->vmx_max_rxsegs = VMXNET3_MAX_RX_SEGS;



Home | Main Index | Thread Index | Old Index