Re: regression with wsdisplay? 2015-06-30 amd64 snap

2015-07-02 Thread Mike Larkin
On Thu, Jul 02, 2015 at 11:50:06AM -0700, patrick keshishian wrote:
 p.s., and evidently, after the sleep/wake, the laptop does not
 care to shutdown, neither by reboot(8) nor the power-button
 press (requires 10s hold of the power-button).
 

You're looking at not too much time between a working kernel
and the broken one, bisecting diffs might help us track down what
failed more quickly.

Also, please use sendbug so we get an acpidump.

-ml

 On 7/2/15, patrick keshishian pkesh...@gmail.com wrote:
  Just noticed this issue with:
 
  OpenBSD 5.8-beta (GENERIC) #1050: Tue Jun 30 11:10:13 MDT 2015
  dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
 
  After a sleep/wake cycle I noticed that key-repeat stopped working.
 
  Running top(1) I see that the display isn't being updated, requiring
  pressing the space-bar to force an update.
 
  Last snapshot on this laptop without any major issues was:
 
  OpenBSD 5.7-current (GENERIC) #973: Tue Jun  2 09:37:26 MDT 2015
  dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
 
  One change was I installed a new 9-Cell battery on this laptop.
 
  Ideas?
 
  I'll try a new snap in a few days.
 
  --patrick
 
 
  dmesg diff:
 
  --- dmesg.boot-snap-20150602Wed Jun  3 20:38:38 2015
  +++ dmesg.boot-snap-20150630Thu Jul  2 11:29:46 2015
  @@ -1,7 +1,7 @@
  -OpenBSD 5.7-current (GENERIC) #973: Tue Jun  2 09:37:26 MDT 2015
  +OpenBSD 5.8-beta (GENERIC) #1050: Tue Jun 30 11:10:13 MDT 2015
   dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
   real mem = 1861025792 (1774MB)
  -avail mem = 1800888320 (1717MB)
  +avail mem = 180082 (1717MB)
   mpath0 at root
   scsibus0 at mpath0: 256 targets
   mainbus0 at root
  @@ -15,7 +15,7 @@ acpi0: wakeup devices PB5_(S5) OHC1(S3) OHC2(S3) EHCI(
   acpitimer0 at acpi0: 3579545 Hz, 32 bits
   acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
   cpu0 at mainbus0: apid 0 (boot processor)
  -cpu0: AMD Athlon(tm) Processor L110, 1197.21 MHz
  +cpu0: AMD Athlon(tm) Processor L110, 1197.19 MHz
   cpu0:
  FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF,SVM,EAPICSP,AMCR8,3DNOWP
   cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
  64b/line 16-way L2 cache
   cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully
  associative
  @@ -34,10 +34,10 @@ acpiprt5 at acpi0: bus -1 (PB7_)
   acpiprt6 at acpi0: bus 9 (P2P_)
   acpiprt7 at acpi0: bus 1 (AGP_)
   acpiec0 at acpi0
  -acpicpu0 at acpi0: C3, C2
  +acpicpu0 at acpi0: C3(@83 io@0x8015), C2(@18 io@0x8014)
   acpitz0 at acpi0: critical temperature is 100 degC
   acpiac0 at acpi0: AC unit online
  -acpibat0 at acpi0: BAT1 model UM09A41 serial 22962 type LION oem SONY
  +acpibat0 at acpi0: BAT1 model UM09A41 serial 14 type LION oem SONY
   acpibtn0 at acpi0: LID_
   acpibtn1 at acpi0: SLPB
   acpibtn2 at acpi0: PWRB
 
 
  Full dmesg:
 
  OpenBSD 5.8-beta (GENERIC) #1050: Tue Jun 30 11:10:13 MDT 2015
  dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
  real mem = 1861025792 (1774MB)
  avail mem = 180082 (1717MB)
  mpath0 at root
  scsibus0 at mpath0: 256 targets
  mainbus0 at root
  bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf1010 (17 entries)
  bios0: vendor Phoenix Technologies LTD version v1.3307 date 05/31/2010
  bios0: Gateway LT31
  acpi0 at bios0: rev 2
  acpi0: sleep states S0 S3 S4 S5
  acpi0: tables DSDT FACP APIC MCFG HPET BOOT SLIC
  acpi0: wakeup devices PB5_(S5) OHC1(S3) OHC2(S3) EHCI(S3) HDAU(S3)
  acpitimer0 at acpi0: 3579545 Hz, 32 bits
  acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
  cpu0 at mainbus0: apid 0 (boot processor)
  cpu0: AMD Athlon(tm) Processor L110, 1197.19 MHz
  cpu0:
  FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF,SVM,EAPICSP,AMCR8,3DNOWP
  cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
  64b/line 16-way L2 cache
  cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully
  associative
  cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully
  associative
  mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
  cpu0: apic clock running at 199MHz
  ioapic0 at mainbus0: apid 1 pa 0xfec0, version 21, 24 pins
  acpimcfg0 at acpi0 addr 0xe000, bus 0-8
  acpihpet0 at acpi0: 14318180 Hz
  acpiprt0 at acpi0: bus 0 (PCI0)
  acpiprt1 at acpi0: bus -1 (PB3_)
  acpiprt2 at acpi0: bus -1 (PB4_)
  acpiprt3 at acpi0: bus 3 (PB5_)
  acpiprt4 at acpi0: bus 4 (PB6_)
  acpiprt5 at acpi0: bus -1 (PB7_)
  acpiprt6 at acpi0: bus 9 (P2P_)
  acpiprt7 at acpi0: bus 1 (AGP_)
  acpiec0 at acpi0
  acpicpu0 at acpi0: C3(@83 io@0x8015), C2(@18 io@0x8014)
  acpitz0 at acpi0: critical temperature is 100 degC
  acpiac0 at acpi0: AC unit online
  acpibat0 at acpi0: BAT1 model UM09A41 serial 14 type LION oem SONY
  

Re: Windows Server on Qemu

2015-08-13 Thread Mike Larkin
On Wed, Aug 12, 2015 at 06:40:33PM -0700, Mike Larkin wrote:
 On Wed, Aug 12, 2015 at 10:00:49PM +0200, Joel Carnat wrote:
  Hi,
  
  Anyone here succeeded in having Windows Server 2008/2008R2/2012/2012R2 run 
  in qemu-2.2.0 (OpenBSD 5.7/amd64) ?
  
  Mine keeps going BSOD on installation. Most of documentation I found was 
  Linux-centric so I may miss some OpenBSD trick.
  
  TIA,
Jo
  
 
 I just installed Server 2008 datacenter without any issues.
 
 I'll try some other versions later.
 
 -ml
 

Server 2008 datacenter 32 bit installed fine.

Any later version requires 64 bit and doesn't work on TCG (unaccelerated)
qemu. This is a qemu bug, not an OpenBSD bug.

Apparently with a couple of diffs floating around on the qemu mailing
list, you can at least get past the 5D BSOD, but you just end up
getting whacked by PatchGuard after a few minutes due to other bugs
in qemu. And then someone fixed^Whacked around that issue and got
further, but then broke app compatibility in some cases.

See:

http://lists.gnu.org/archive/html/qemu-devel/2014-08/msg02161.html

and

http://lists.gnu.org/archive/html/qemu-devel/2012-09/msg01412.html

and

http://lists.gnu.org/archive/html/qemu-devel/2015-07/msg03729.html


I'm not sure what you were after, but if you just need any Windows
server, 32 bit server 2008 runs fine (albeit very slowly, like 25%
native speed).

-ml



Re: can't wake from zzz

2015-08-13 Thread Mike Larkin
On Thu, Aug 13, 2015 at 11:53:29AM +0200, Marko Cupa?? wrote:
On Thu, May 21, 2015 at 12:23:01AM +0200, Marko Cupa? wrote:
 Hi,
 
 I'm on 2015-May-20 snapshot, running xfce on a laptop which
 does not wake from zzz.

Catching up on old emails -

Please try a new snapshot since things have changed a bit since
May.
   
   Thank you for reminding me it's time to check if there has been some
   progress with my favourite OS' support for my ThinkPad T440.
   
If this is still a problem, you'll need to give more information
than just does not wake from zzz. Does it power on but not get
back to where you suspended? Does the fan start, backlight come
on? Does it reboot? etc ...
   
   It does not power on. This laptop is very quiet when running
   OpenBSD, most of the time I don't know if fan rotates or not, but I
   guess it does not start after pressing power button in suspended
   state. No backlight either. Power button on T440 has green led
   light, and after going into suspended state led has slow on/off
   pattern. It doesn't change by pressing the button. All I can do is
   holding it for more than 4 seconds to turn it off.
  
  A couple notes:
  
  1. Try what kettenis@ suggested with the tpm (on -current), let us
  know what happens.
 I disabled TPM and waking from zzz works now as well. Thanks for
 the tip, Mark!
 
  2. It looks like the lid is only going to wake your machine from S4
  'ZZZ', which is a bit odd. Opening the lid should not (and apparently
  does not) wake from 'zzz'.
 Opening the lid does wake from both zzz and ZZZ in XFCE. Should I test
 it without graphical environment started?
 

This was a misread on my part, it should wake from S4 *and higher* which
obviously includes S3 (zzz).

Glad to see things are working.

-ml

  3. try pressing the blue Fn button on the keyboard when it's asleep
  in 'zzz'. That sometimes is wired on thinkpads to the SLPB device. Or
  try whatever the combination for sleep is (something like Fn+F4
  usually, but look on your keyboard).
 Pressing Fn button (white, not blue on T440 though :) wakes up from
 zzz, and so does pressing power button. Fn+F4 is mic mute, I don't
 think there is Fn+FX sleep button on this model.

Sounds good.

 
  If #3 above works, we probably aren't setting up the masks right for
  wake from the fixed function power button. Can you send an acpidump
  (apologies if you did, but it got nuked somewhere) in the meantime?
 I never sent acpidump. Here's the link (as attachments are not allowed
 here if I remember well):
 https://www.mimar.rs/oblak/index.php/s/FUBVrwA2N656yZV
 
 It will be there until the end of August.

As per the TPM fix, I think this is not needed anymore but thanks
anyway.

 
 Regards,
 -- 
 Marko Cupa??
 https://www.mimar.rs/



Re: Windows Server on Qemu

2015-08-12 Thread Mike Larkin
On Wed, Aug 12, 2015 at 10:00:49PM +0200, Joel Carnat wrote:
 Hi,
 
 Anyone here succeeded in having Windows Server 2008/2008R2/2012/2012R2 run in 
 qemu-2.2.0 (OpenBSD 5.7/amd64) ?
 
 Mine keeps going BSOD on installation. Most of documentation I found was 
 Linux-centric so I may miss some OpenBSD trick.
 
 TIA,
   Jo
 

I just installed Server 2008 datacenter without any issues.

I'll try some other versions later.

-ml



Re: Kernel Driver Question

2015-08-21 Thread Mike Larkin
On Fri, Aug 21, 2015 at 01:29:20PM -0400, sven falempin wrote:
 Dear Readers,
 
 is 'bus_dma'
 http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man9/bus_dma.9
 the equivalent of  'ioremap/ioread32'
 http://www.makelinux.net/ldd3/chp-9-sect-4--
 ?
 
 trying to port a driver : watchdog/sp5100_tco.c, wondering the openbsd
 equivalent of readl :
 if (sp5100_tco_pci-revision = 0x40) {
 /* Read SBResource_MMIO from AcpiMmioEn(PM_Reg: 24h) */
 outb(SB800_PM_ACPI_MMIO_EN+3, SB800_IO_PM_INDEX_REG);
 [..bus space map equivalent..]
 } else {
 [...]
 /* Check MMIO address conflict */
 if (request_mem_region_exclusive(val, SP5100_WDT_MEM_MAP_SIZE,
   dev_name)) {
 [...]
 tcobase = ioremap(val, SP5100_WDT_MEM_MAP_SIZE);
 [...]
 /* Check that the watchdog action is set to reset the system */
 [..ioread32 old school form..]
 val = readl(SP5100_WDT_CONTROL(tcobase));
 
 
 Best regards,
 

no context here, but you're probably looking for something like
bus_space_read_4

-ml



Re: can't wake from zzz

2015-08-11 Thread Mike Larkin
On Thu, May 21, 2015 at 12:23:01AM +0200, Marko Cupa? wrote:
 Hi,
 
 I'm on 2015-May-20 snapshot, running xfce on a laptop which does not
 wake from zzz.

Catching up on old emails -

Please try a new snapshot since things have changed a bit since May.

If this is still a problem, you'll need to give more information than
just does not wake from zzz. Does it power on but not get back to
where you suspended? Does the fan start, backlight come on? Does it
reboot? etc ...

If you can, also please try ZZZ (capital) and see if you can properly
resume from hibernate as opposed to zzz, that may tell us something.

-ml

 
 dmesg:
 OpenBSD 5.7-current (GENERIC.MP) #994: Tue May 19 21:44:56 MDT 2015
 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
 real mem = 8246050816 (7864MB)
 avail mem = 7992299520 (7622MB)
 mpath0 at root
 scsibus0 at mpath0: 256 targets
 mainbus0 at root
 bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdcd3d000 (61 entries)
 bios0: vendor LENOVO version GJET80WW (2.30 ) date 10/20/2014
 bios0: LENOVO 20B6005RUS
 acpi0 at bios0: rev 2
 acpi0: sleep states S0 S3 S4 S5
 acpi0: tables DSDT FACP SLIC DBGP ECDT HPET APIC MCFG SSDT SSDT SSDT SSDT 
 SSDT SSDT SSDT SSDT PCCT SSDT TCPA UEFI MSDM ASF! BATB FPDT UEFI DMAR
 acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3)
 acpitimer0 at acpi0: 3579545 Hz, 24 bits
 acpiec0 at acpi0
 acpihpet0 at acpi0: 14318179 Hz
 acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
 cpu0 at mainbus0: apid 0 (boot processor)
 cpu0: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 798.29 MHz
 cpu0: 
 FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID
 cpu0: 256KB 64b/line 8-way L2 cache
 cpu0: smt 0, core 0, package 0
 mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
 cpu0: apic clock running at 99MHz
 cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4, IBE
 cpu1 at mainbus0: apid 1 (application processor)
 cpu1: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 798.15 MHz
 cpu1: 
 FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID
 cpu1: 256KB 64b/line 8-way L2 cache
 cpu1: smt 1, core 0, package 0
 cpu2 at mainbus0: apid 2 (application processor)
 cpu2: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 798.15 MHz
 cpu2: 
 FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID
 cpu2: 256KB 64b/line 8-way L2 cache
 cpu2: smt 0, core 1, package 0
 cpu3 at mainbus0: apid 3 (application processor)
 cpu3: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 798.15 MHz
 cpu3: 
 FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID
 cpu3: 256KB 64b/line 8-way L2 cache
 cpu3: smt 1, core 1, package 0
 ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins
 acpimcfg0 at acpi0 addr 0xf800, bus 0-63
 acpiprt0 at acpi0: bus 0 (PCI0)
 acpiprt1 at acpi0: bus -1 (PEG_)
 acpiprt2 at acpi0: bus 2 (EXP1)
 acpiprt3 at acpi0: bus 3 (EXP2)
 acpiprt4 at acpi0: bus -1 (EXP3)
 acpicpu0 at acpi0: C3, C1, PSS
 acpicpu1 at acpi0: C3, C1, PSS
 acpicpu2 at acpi0: C3, C1, PSS
 acpicpu3 at acpi0: C3, C1, PSS
 acpipwrres0 at acpi0: PUBS, resource for XHCI, EHC1
 acpipwrres1 at acpi0: NVP3, resource for PEG_
 acpipwrres2 at acpi0: NVP2, resource for PEG_
 acpitz0 at acpi0: critical temperature is 200 degC
 acpibtn0 at acpi0: LID_
 acpibtn1 at acpi0: SLPB
 acpibat0 at acpi0: BAT0 model 45N1109 serial 32908 type LION oem SANYO
 acpibat1 at acpi0: BAT1 model 45N1125 serial 29922 type LION oem SANYO
 acpiac0 at acpi0: AC unit offline
 acpithinkpad0 at acpi0
 cpu0: Enhanced SpeedStep 798 MHz: speeds: 2501, 2500, 2400, 2200, 2100, 1900, 
 1800, 1700, 1600, 1500, 1300, 1200, 1100, 1000, 800, 775 MHz
 pci0 at mainbus0 bus 0
 pchb0 at pci0 dev 0 function 0 Intel Core 4G Host rev 0x0b
 vga1 at pci0 dev 2 function 0 Intel HD Graphics rev 0x0b
 intagp at vga1 not configured
 inteldrm0 at vga1
 drm0 at inteldrm0
 error: 

Re: Docker on OpenBSD?

2015-08-04 Thread Mike Larkin
On Tue, Aug 04, 2015 at 09:30:37PM +, openda...@hushmail.com wrote:
 Hi!
 
 On Tuesday, August 04, 2015 at 4:47 PM, Mike Larkin mlar...@azathoth.net 
 wrote:
 
 From your first link:
 
 Docker on FreeBSD relies heavily on ZFS, jail and the 64bit Linux 
 compatibility layer
 
 I think that says enough to answer your question.
 
 Sort of, but https://news.ycombinator.com/item?id=8480433 does mention 
 sysjail for OpenBSD. That post is quite old, so maybe things have changed 
 since then?
 
 Thanks!
 
 O.D.
 

the short answer is no, docker does not work on openbsd.

if you are interested in making it work, please do so and send a diff.



Re: Docker on OpenBSD?

2015-08-04 Thread Mike Larkin
On Tue, Aug 04, 2015 at 03:59:38PM +, openda...@hushmail.com wrote:
 Hi!
 
 Are there any efforts being made to port the FreeBSD Docker port to OpenBSD?
 
 https://wiki.freebsd.org/Docker
 https://github.com/kvasdopil/docker
 
 Wish I didn't have to ask, but it's the only way I can install Discourse 
 (https://github.com/discourse/discourse) without being shunned by its 
 community (https://forums.docker.com/t/solutions-for-docker-on-freebsd/2082/).
 
 Thanks!
 
 O.D.
 

From your first link:

Docker on FreeBSD relies heavily on ZFS, jail and the 64bit Linux 
compatibility layer

I think that says enough to answer your question.



Re: Windows Server on Qemu

2015-08-13 Thread Mike Larkin
On Wed, Aug 12, 2015 at 07:30:35PM -0600, Jorge Castillo wrote:
 You might be interest in using a cheap VPS from Vultr. You can run it on
 demand, if you need only X hours of use you only pay X hours.
 

Or a free micro instance from AWS.



Re: Various ACPI problems on various IBM hardware

2015-08-14 Thread Mike Larkin
On Fri, Aug 14, 2015 at 03:13:17PM +0200, Frederic URBAN wrote:
 Hello,
 
 We have some ACPI problems with various IBM server X. Since it's a very 
 early panic when kernel boot there is now access to ddb to print the 
 trace. You are prompted to press any key to reboot :) It has been 
 verified on IBM Server x3650 M1, M2 and M3. We are using OpenBSD 5.7, 
 this panic happends with bsd.rd and bsd.mp
 
 The system is usable when I disable acpi when booting on RAMDISK_CD and 
 after the installation on GENERIC.MP
 
 I can provide a screenshot of the KVM over LAN if you guys wants. Like 
 we did in the past (Adding support of Intel 82576 on em(4)), I also can 
 provide you a remote access to both oldest machines (a Server x3650 M1 
 and a Server x3650 M2) with serial cable to help you to fix this. We are 
 big users of OpenBSD on various systems (Dell, HP) for the first time i 
 need to install a firewall on IBM hardware so if we can help, i'm ready 
 to setup a lab for you.
 

I'll volunteer to help here. Please send a dmesg and screen capture of
the panic, and acpidump if available.

We can then decide if remote access is needed.

-ml

 Fr??d??ric.
 -- 
 Fr??d??ric URBAN
 *Fr??d??ric URBAN*
 Ing??nieur R??seaux
 
 frederic.ur...@ircad.fr mailto:frederic.ur...@ircad.fr
 T??l. : +33 (0)3 88 119 038
   IRCAD France
 http://www.ircad.fr/ http://www.ircad.fr/
 
 Suivez l'IRCAD sur Facebook 
 http://www.facebook.com/pages/IRCAD/193785273990141
 
 *IRCAD France*
 H??pitaux Universitaires - 1, place de l'H??pital - 67091 Strasbourg Cedex 
 - FRANCE



Re: can't wake from zzz

2015-08-12 Thread Mike Larkin
On Wed, Aug 12, 2015 at 03:40:51PM +0200, Marko Cupa?? wrote:
 On Tue, 11 Aug 2015 10:50:54 -0700
 Mike Larkin mlar...@azathoth.net wrote:
 
  On Thu, May 21, 2015 at 12:23:01AM +0200, Marko Cupa? wrote:
   Hi,
   
   I'm on 2015-May-20 snapshot, running xfce on a laptop which does not
   wake from zzz.
  
  Catching up on old emails -
  
  Please try a new snapshot since things have changed a bit since May.
 
 Thank you for reminding me it's time to check if there has been some
 progress with my favourite OS' support for my ThinkPad T440.
 
  If this is still a problem, you'll need to give more information than
  just does not wake from zzz. Does it power on but not get back to
  where you suspended? Does the fan start, backlight come on? Does it
  reboot? etc ...
 
 It does not power on. This laptop is very quiet when running OpenBSD,
 most of the time I don't know if fan rotates or not, but I guess it
 does not start after pressing power button in suspended state. No
 backlight either. Power button on T440 has green led light, and after
 going into suspended state led has slow on/off pattern. It doesn't
 change by pressing the button. All I can do is holding it for more than
 4 seconds to turn it off.

A couple notes:

1. Try what kettenis@ suggested with the tpm (on -current), let us know
what happens.

2. It looks like the lid is only going to wake your machine from S4 'ZZZ',
which is a bit odd. Opening the lid should not (and apparently does not)
wake from 'zzz'.

3. try pressing the blue Fn button on the keyboard when it's asleep in
'zzz'. That sometimes is wired on thinkpads to the SLPB device. Or try 
whatever the combination for sleep is (something like Fn+F4 usually,
but look on your keyboard).

If #3 above works, we probably aren't setting up the masks right for wake
from the fixed function power button. Can you send an acpidump (apologies
if you did, but it got nuked somewhere) in the meantime?

-ml


 
  If you can, also please try ZZZ (capital) and see if you can properly
  resume from hibernate as opposed to zzz, that may tell us something.
 
 I can ZZZ, it appears to work properly.
 
 Here's dmesg:
 
 OpenBSD 5.8 (GENERIC.MP) #1235: Mon Aug 10 06:54:34 MDT 2015
 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
 real mem = 8244805632 (7862MB)
 avail mem = 7991037952 (7620MB)
 mpath0 at root
 scsibus0 at mpath0: 256 targets
 mainbus0 at root
 bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xbcc0d000 (61 entries)
 bios0: vendor LENOVO version GJET83WW (2.33 ) date 03/09/2015
 bios0: LENOVO 20B6005RUS
 acpi0 at bios0: rev 2
 acpi0: sleep states S0 S3 S4 S5
 acpi0: tables DSDT FACP SLIC DBGP ECDT HPET APIC MCFG SSDT SSDT SSDT SSDT 
 SSDT SSDT SSDT SSDT PCCT SSDT TCPA UEFI MSDM ASF! BATB FPDT UEFI DMAR
 acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3)
 acpitimer0 at acpi0: 3579545 Hz, 24 bits
 acpiec0 at acpi0
 acpihpet0 at acpi0: 14318179 Hz
 acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
 cpu0 at mainbus0: apid 0 (boot processor)
 cpu0: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 1796.15 MHz
 cpu0: 
 FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,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, 10 var ranges, 88 fixed ranges
 cpu0: apic clock running at 99MHz
 cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
 cpu1 at mainbus0: apid 1 (application processor)
 cpu1: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 1795.84 MHz
 cpu1: 
 FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,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 1, core 0, package 0
 cpu2 at mainbus0: apid 2 (application processor)
 cpu2: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 1795.84 MHz
 cpu2: 
 FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,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 1, package 0
 cpu3 at mainbus0: apid 3 (application processor)
 cpu3: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 1795.84 MHz
 cpu3: 
 FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI

Re: W^X Wikipedia Executable space protection page lacking

2015-07-22 Thread Mike Larkin
On Wed, Jul 22, 2015 at 09:26:15PM +0100, Kevin Chadwick wrote:
 The following wikipedia page hints to me that it may have been edited by
 someone with an agenda or atleast under stated. I was going to rewrite
 the OpenBSD section or undo the edit from 2008 by Guy Harris but worry
 that I may be over zealous in the other direction. Anyone want to fix
 it? If no-one does I will fix it and mention the entire address space.
 
 https://en.wikipedia.org/wiki/Executable_space_protection

Whatever is in Wikipedia today on that page seems accurate to me. I
don't think there is any agenda in play here. Most of the relevant
discussion was moved to W^X page, which is fine.

At some point we will finish the job on i386 to enable kernel W^X
on processors that have PAE capability. I started on that at this past week
but it's not ready yet. At that point someone can go back and edit 
the W^X page to update that.



Re: which netbook not to buy?

2015-07-12 Thread Mike Larkin
On Sun, Jul 12, 2015 at 09:02:31PM +, Ruslanas G??ibovskis wrote:
 I would suggest x201s for Many reasons. You can find it without hdd on ebay
 for 100usd... + ssd any... but I am not sure about openbsd... with debian
 it just works.

Assuming you meant Thinkpad x201s (eg a model ending in s and not multiple
x201 thinkpads) ...

If you can find x201s Thinkpads for 100USD, I would recommend buying as many as
you can. They are extremely rare and almost never come up for auction intact.
You can find lots of parts / pieces for them but almost never a complete unit.
And when you do, they are almost certainly not going to be 100USD. Looking
at ebay right now shows plenty of spare parts but no complete units. And that's
usually the case with that model.

Now, plain x201 (without the 's') and x200s are entirely a different story and
can usually be found quite cheaply.

-ml

 
 On Sun, 12 Jul 2015 17:41 Peter J. Philipp p...@centroid.eu wrote:
 
  Hi,
 
  I'm considering buying a new netbook (currently I have an October 2012 Acer
  Aspire One).  If at all I'd like to stay with Acer but not necessarily.
  I'm
  worried about UEFI secure boot on these netbooks.  Is there any Acer models
  that I definitely should not buy?
 
  Regards,
 
  -peter



Re: requesting help working around boot failures with supermicro atom board

2015-10-06 Thread Mike Larkin
On Mon, Oct 05, 2015 at 01:18:53PM -0400, dewey.hyl...@gmail.com wrote:
> unfortunately, not on my end. i have hopes that mike larkin may find something
> when he gets a chance to look, but i am past the limit of my capabilities and
> supermicro support has discontinued responding to me. their last suggestion 
> was
> to switch to linux or windows, and their last message was of the "we'll get
> back to you" variety. 
> 

I had thought this was acpi related earlier (before we realized that disabling
lm* fixes it). So I have no news here, as I don't think the solution is going
to be found in the AML.

The lm(4) sensor is probably getting wedged somehow, which is causing the bios
to think the machine is too hot on reboot. Even though it's not.

I don't know a lot about the lm(4) driver so I don't think I'll be able to
help much here. One of the things I do know about it is that sometimes you
don't actually even have a real lm(4), and that it's simulated by some other
component or even SMM. Maybe the manufacturer did a poor job. Shrug.

Sorry, I'm out of ideas. Maybe someone else can debug it for you.

-ml

> so on a related note, i'm on the hunt for something which can replace this
> board's functionality without breaking the bank. something not supported by
> supermicro, as this is a brand new board and they seem to be unwilling to 
> provide support anyway. remote kvm/power is the sole purpose for choosing this
> supermicro device in the first place. i have plenty much more expensive and
> more powerful supermicro devices at customer sites which do not show this
> issue - but their non-support of this brand-new motherboard shows me that they
> are not who i want to be relying on.
> 
> - On Oct 5, 2015, at 12:08 PM, Sonic sonicsm...@gmail.com wrote:
> 
> Any progress on this issue?
> 
> On Thu, Sep 17, 2015 at 1:26 PM, Mike Larkin <mlar...@azathoth.net> wrote:
> > On Thu, Sep 17, 2015 at 12:40:12PM +0000, Dewey Hylton wrote:
> >> Dewey Hylton  gmail.com> writes:
> >>
> >> >
> >> > Mike Larkin  azathoth.net> writes:
> >> >
> >> > >
> >> > > On Tue, Sep 15, 2015 at 07:16:40PM +, Dewey Hylton wrote:
> >> > > > Dewey Hylton  gmail.com> writes:
> >> > > >
> >> > > > >
> >> > > > > Mike Larkin  azathoth.net> writes:
> >> > > >
> >> > > > > > acpidump please.
> >>
> >> > motherboard: supermicro x7spe-hf-d525 rev 1.0
> >> > bios: 1.2b
> >> >
> >> > at the end of this link is an archive containing acpidump output for all
> >> > three acpi settings in the bios (1.0, 2.0, 3.0).
> >> >
> >> > https://goo.gl/tWGL6C
> >> >
> >> > i apologize for the somewhat hidden link; gmane wouldn't allow me to post
> >> > the full link because it's greater than 80 characters.
> >> >
> >> > please let me know if i can help in any way; i honestly know nothing 
> >> > about
> >> > acpi but am willing to learn or assist otherwise if it means 
> >> > understanding
> >> > and potentially fixing this issue.
> >>
> >> i was able to export the DSDT files into something human-readable. while i
> >> don't really understand much of what i'm seeing in the resulting text 
> >> files,
> >> diff shows that the differences between the three acpi versions are
> >> nonexistent. i have no idea about the other files, of which there are 
> >> several.
> >>
> >> Mike, does the acpidump output help at all? if not, am i simply at the 
> >> point
> >> where this hardware is not compatible with OpenBSD?
> >>
> >
> > Haven't had a chance to look at it yet.
> >
> > -ml



Re: requesting help working around boot failures with supermicro atom board

2015-10-06 Thread Mike Larkin
On Tue, Sep 15, 2015 at 02:45:02AM +, Dewey Hylton wrote:
> Mark Kettenis  xs4all.nl> writes:
> 
> > 
> > > # sysctl -a|grep 'sensors.*temp'
> > > hw.sensors.cpu0.temp0=30.00 degC
> > > hw.sensors.lm1.temp0=0.00 degC
> > > hw.sensors.lm1.temp1=14.00 degC
> > > hw.sensors.lm1.temp2=14.00 degC
> > > # reboot
> > > 
> > > BEEEP!
> > 
> > Oh that is interesting.  Can you try disabling the lm(4) driver in
> > your kernel?  You can do:
> > 
> > # config -ef /bsd
> > ...
> > ukc> disable lm
> > 254 lm0 disabled
> > 255 lm* disabled
> > 256 lm* disabled
> > ukc> quit
> > Saving modified kernel.
> > # reboot
> > 
> > That reboot will probably still hang.  But it'd be interesting to see
> > if any subsequent reboots work better.
> 
> *this* interests me, and was basically what i was asking in the original
> post - except i had no idea what might need to be disabled. one step at a
> time, it's been interesting the things that have popped up.
> 
> still no idea whether this has anything to do with the seemingly
> openbsd-only issue, but ...
> 
> i made this change, booted the new kernel, ran 'cksum /dev/mem' a bunch of
> times in hopes of raising the temperature somewhat (did get to 36C, which is
> higher than in my previous tests). then i rebooted, and the box came back up
> without incident.
> 
> so i'm going to run through this several times with reboots in every 20
> minutes or so and see if it survives the night.
> 

Based on this and my previous email, my recommendation would be to disable
lm(4) on this particular machine.



Re: requesting help working around boot failures with supermicro atom board

2015-10-08 Thread Mike Larkin
On Wed, Oct 07, 2015 at 11:17:25PM -0400, Dewey Hylton wrote:
> you missed my update which followed that post. it did not survive the night
> - even with lm disabled in the kernel, some number of reboots later i
> encountered the same failure. that update is on the list, but i'll include
> the copy/paste below.
> 
> meanwhile, is there still hope for answers relating to acpi?
> 

I doubt it. I took a look at your AML and it seemed reasonable.

-ml

> -- Forwarded message --
> From: Dewey Hylton <dewey.hyl...@gmail.com>
> To: misc@openbsd.org
> Cc:
> Date: Tue, 15 Sep 2015 19:19:10 + (UTC)
> Subject: Re: requesting help working around boot failures with supermicro
> atom board
> Dewey Hylton  gmail.com> writes:
> 
> >
> > Mark Kettenis  xs4all.nl> writes:
> 
> > > Oh that is interesting.  Can you try disabling the lm(4) driver in
> > > your kernel?  You can do:
> > >
> > > # config -ef /bsd
> > > ...
> > > ukc> disable lm
> > > 254 lm0 disabled
> > > 255 lm* disabled
> > > 256 lm* disabled
> > > ukc> quit
> > > Saving modified kernel.
> > > # reboot
> > >
> > > That reboot will probably still hang.  But it'd be interesting to see
> > > if any subsequent reboots work better.
> >
> 
> 
> sadly, the first thing i heard when entering the lab this morning was
> BEEEEEP!
> 
> so disabling the sensor drivers in the kernel did not do the trick. without
> other ideas, i'm down to providing acpidump output and hoping someone can
> tell me where to go next ...
> 
> 
> On Wed, Oct 7, 2015 at 12:41 AM, Mike Larkin <mlar...@azathoth.net> wrote:
> 
> > On Tue, Sep 15, 2015 at 02:45:02AM +, Dewey Hylton wrote:
> > > Mark Kettenis  xs4all.nl> writes:
> > >
> > > >
> > > > > # sysctl -a|grep 'sensors.*temp'
> > > > > hw.sensors.cpu0.temp0=30.00 degC
> > > > > hw.sensors.lm1.temp0=0.00 degC
> > > > > hw.sensors.lm1.temp1=14.00 degC
> > > > > hw.sensors.lm1.temp2=14.00 degC
> > > > > # reboot
> > > > >
> > > > > BEEEP!
> > > >
> > > > Oh that is interesting.  Can you try disabling the lm(4) driver in
> > > > your kernel?  You can do:
> > > >
> > > > # config -ef /bsd
> > > > ...
> > > > ukc> disable lm
> > > > 254 lm0 disabled
> > > > 255 lm* disabled
> > > > 256 lm* disabled
> > > > ukc> quit
> > > > Saving modified kernel.
> > > > # reboot
> > > >
> > > > That reboot will probably still hang.  But it'd be interesting to see
> > > > if any subsequent reboots work better.
> > >
> > > *this* interests me, and was basically what i was asking in the original
> > > post - except i had no idea what might need to be disabled. one step at a
> > > time, it's been interesting the things that have popped up.
> > >
> > > still no idea whether this has anything to do with the seemingly
> > > openbsd-only issue, but ...
> > >
> > > i made this change, booted the new kernel, ran 'cksum /dev/mem' a bunch
> > of
> > > times in hopes of raising the temperature somewhat (did get to 36C,
> > which is
> > > higher than in my previous tests). then i rebooted, and the box came
> > back up
> > > without incident.
> > >
> > > so i'm going to run through this several times with reboots in every 20
> > > minutes or so and see if it survives the night.
> > >
> >
> > Based on this and my previous email, my recommendation would be to disable
> > lm(4) on this particular machine.



Re: kernel panic

2015-10-08 Thread Mike Larkin
On Fri, Oct 09, 2015 at 06:22:53AM +0200, Holger Glaess wrote:
> hi
> 
> what kind of information you need more ?
> 

uhm. this machine is very very strange. It has devices I've never
seen before and many other devices not even recognized. Without access
to the hardware there's not much we can do here.

You've posted about this machine in the past, and we've done our best
to help you but I think this may be a losing battle.

> holger
> 
> 
> Stopped at  0:ehci0: unrecoverable error, controller halted
> panic: kernel diagnostic assertion "ci->ci_fpcurproc == p" failed: file
> "../../../../arch/i386/isa/npx.c", line 881
>   Stopped at  Debugger+0x7:   leave
>TIDPIDUID PRFLAGS PFLAGS  CPU  COMMAND
> Debugger(d09fe02c,f51cfdd4,d09d8f30,f51cfdd4,d709bfc8) at Debugger+0x7
> panic(d09d8f30,d0957746,d0b0522f,d0b0532c,371) at panic+0x71
> __assert(d0957746,d0b0532c,371,d0b0522f,d0bbb160) at __assert+0x2e
> npxsave_proc(d7216744,0,f51cfe58,d03b9029,40) at npxsave_proc+0x5a
> cpu_exit(d7216744,d7215000,d709b00c,0,1) at cpu_exit+0x2a
> exit1(d7216744,4,1,d03b3844,40,4,1,0) at exit1+0x22c
> sigexit(d7216744,4,0,0,21fc000) at sigexit+0x76
> postsig(4,0,808f05d0,63,21de800) at postsig+0x28a
> userret(d7216744) at userret+0x49
> alltraps(,,,,) at alltraps+0x2e
> uvm_fault(0xd0bbb0a0, 0xd000, 0, 1) -> e
> kernel: page fault trap, code=0
> Stopped at  trap+0x18:  movl0x2c(%esi),%edi
>TIDPIDUID PRFLAGS PFLAGS  CPU  COMMAND
> trap() at trap+0x18
> --- trap (number 32) ---
> 0:
> http://www.openbsd.org/ddb.html describes the minimum info required in bug
> reports.  Insufficient info makes it difficult to find and fix bugs.
> ddb>
> 
> 
> OpenBSD 5.8-current (GENERIC) #1219: Thu Oct  8 07:55:22 MDT 2015
> dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
> cpu0: Genuine Intel(R) processor 1.20GHz ("GenuineIntel" 686-class) 1.21 GHz
> cpu0: 
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,PBE,PERF
> real mem  = 1072041984 (1022MB)
> avail mem = 1038999552 (990MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: date 07/06/09, BIOS32 rev. 0 @ 0xfa530, SMBIOS rev. 2.2 @
> 0xf0800 (39 entries)
> bios0: vendor Phoenix Technologies, LTD version "ANSA 3020 R01
> Jul,2,2009" date 07/06/2009
> acpi0 at bios0: rev 0
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP MCFG APIC
> acpi0: wakeup devices EPA0(S3) EPA1(S3) PEX0(S5) PEX1(S5) PEX2(S5) PEX3(S5)
> HUB0(S5) PCI0(S5)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimcfg0 at acpi0 addr 0xe000, bus 0-255
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 133MHz
> ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 2 (EPA1)
> acpiprt2 at acpi0: bus -1 (BR10)
> acpiprt3 at acpi0: bus -1 (BR11)
> acpiprt4 at acpi0: bus -1 (BR12)
> acpiprt5 at acpi0: bus -1 (BR13)
> acpiprt6 at acpi0: bus -1 (BR14)
> acpiprt7 at acpi0: bus 3 (P0P1)
> acpiprt8 at acpi0: bus -1 (PEX0)
> acpiprt9 at acpi0: bus -1 (PEX1)
> acpiprt10 at acpi0: bus -1 (PEX2)
> acpiprt11 at acpi0: bus -1 (PEX3)
> acpiprt12 at acpi0: bus -1 (HUB0)
> acpicpu0 at acpi0: C1(@1 halt!)
> acpitz0 at acpi0: critical temperature is 75 degC
> acpibtn0 at acpi0: PWRB
> bios0: ROM list: 0xc8000/0x4000! 0xcc000/0x2200! 0xef000/0x1000!
> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> pchb0 at pci0 dev 0 function 0 "Intel EP80579 Host" rev 0x01
> "Intel EP80579 Memory" rev 0x01 at pci0 dev 0 function 1 not configured
> "Intel EP80579 EDMA" rev 0x01 at pci0 dev 1 function 0 not configured
> ppb0 at pci0 dev 2 function 0 "Intel EP80579 PCIE" rev 0x01: apic 2 int 16
> pci1 at ppb0 bus 1
> em0 at pci1 dev 0 function 0 "Intel 82574L" rev 0x00: msi, address
> 00:14:b7:00:61:63
> ppb1 at pci0 dev 3 function 0 "Intel EP80579 PCIE" rev 0x01: apic 2 int 16
> pci2 at ppb1 bus 2
> ppb2 at pci0 dev 4 function 0 "Intel EP80579" rev 0x01
> pci3 at ppb2 bus 3
> em1 at pci3 dev 0 function 0 "Intel EP80579 LAN" rev 0x01: apic 2 int 16,
> address 00:14:b7:00:61:65
> em2 at pci3 dev 1 function 0 "Intel EP80579 LAN" rev 0x01: apic 2 int 17,
> address 00:14:b7:00:61:66
> em3 at pci3 dev 2 function 0 "Intel EP80579 LAN" rev 0x01: apic 2 int 18,
> address ff:ff:ff:ff:ff:ff
> gcu0 at pci3 dev 3 function 0 "Intel EP80579 GCU" rev 0x01
> "Intel EP80579 CANbus" rev 0x01 at pci3 dev 4 function 0 not configured
> "Intel EP80579 CANbus" rev 0x01 at pci3 dev 5 function 0 not configured
> "Intel EP80579 Serial" rev 0x01 at pci3 dev 6 function 0 not configured
> "Intel EP80579 1588" rev 0x01 at pci3 dev 7 function 0 not configured
> "Intel EP80579 LEB" rev 0x01 at pci3 dev 8 function 0 not configured
> vendor "Intel", unknown product 

Re: kernel panic

2015-10-09 Thread Mike Larkin
On Fri, Oct 09, 2015 at 04:35:48AM -0700, Mike Larkin wrote:
> On Fri, Oct 09, 2015 at 09:53:16AM +0200, Holger Glaess wrote:
> > > On Fri, Oct 09, 2015 at 06:22:53AM +0200, Holger Glaess wrote:
> > >> hi
> > >>
> > >> what kind of information you need more ?
> > >>
> > >
> > > uhm. this machine is very very strange. It has devices I've never
> > > seen before and many other devices not even recognized. Without access
> > > to the hardware there's not much we can do here.
> > >
> > > You've posted about this machine in the past, and we've done our best
> > > to help you but I think this may be a losing battle.
> > >
> > 
> > hi
> >  you mean physikal access or is connection by ssh also ok ?
> > 
> > ssh access  i can give you.
> > 
> 
> I meant getting one of these boards in hand.
> 

PS that wasn't me volunteering. It was just a statement that debugging strange
hardware usually goes faster with physical access.

> > 
> > Holger
> > 
> > 
> > >> holger
> > >>
> > >>
> > >> Stopped at  0:ehci0: unrecoverable error, controller halted
> > >> panic: kernel diagnostic assertion "ci->ci_fpcurproc == p" failed: file
> > >> "../../../../arch/i386/isa/npx.c", line 881
> > >>   Stopped at  Debugger+0x7:   leave
> > >>TIDPIDUID PRFLAGS PFLAGS  CPU  COMMAND
> > >> Debugger(d09fe02c,f51cfdd4,d09d8f30,f51cfdd4,d709bfc8) at Debugger+0x7
> > >> panic(d09d8f30,d0957746,d0b0522f,d0b0532c,371) at panic+0x71
> > >> __assert(d0957746,d0b0532c,371,d0b0522f,d0bbb160) at __assert+0x2e
> > >> npxsave_proc(d7216744,0,f51cfe58,d03b9029,40) at npxsave_proc+0x5a
> > >> cpu_exit(d7216744,d7215000,d709b00c,0,1) at cpu_exit+0x2a
> > >> exit1(d7216744,4,1,d03b3844,40,4,1,0) at exit1+0x22c
> > >> sigexit(d7216744,4,0,0,21fc000) at sigexit+0x76
> > >> postsig(4,0,808f05d0,63,21de800) at postsig+0x28a
> > >> userret(d7216744) at userret+0x49
> > >> alltraps(,,,,) at alltraps+0x2e
> > >> uvm_fault(0xd0bbb0a0, 0xd000, 0, 1) -> e
> > >> kernel: page fault trap, code=0
> > >> Stopped at  trap+0x18:  movl0x2c(%esi),%edi
> > >>TIDPIDUID PRFLAGS PFLAGS  CPU  COMMAND
> > >> trap() at trap+0x18
> > >> --- trap (number 32) ---
> > >> 0:
> > >> http://www.openbsd.org/ddb.html describes the minimum info required in
> > >> bug
> > >> reports.  Insufficient info makes it difficult to find and fix bugs.
> > >> ddb>
> > >>
> > >>
> > >> OpenBSD 5.8-current (GENERIC) #1219: Thu Oct  8 07:55:22 MDT 2015
> > >> dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
> > >> cpu0: Genuine Intel(R) processor 1.20GHz ("GenuineIntel" 686-class) 1.21
> > >> GHz
> > >> cpu0:
> > >> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,PBE,PERF
> > >> real mem  = 1072041984 (1022MB)
> > >> avail mem = 1038999552 (990MB)
> > >> mpath0 at root
> > >> scsibus0 at mpath0: 256 targets
> > >> mainbus0 at root
> > >> bios0 at mainbus0: date 07/06/09, BIOS32 rev. 0 @ 0xfa530, SMBIOS rev.
> > >> 2.2 @
> > >> 0xf0800 (39 entries)
> > >> bios0: vendor Phoenix Technologies, LTD version "ANSA 3020 R01
> > >> Jul,2,2009" date 07/06/2009
> > >> acpi0 at bios0: rev 0
> > >> acpi0: sleep states S0 S3 S4 S5
> > >> acpi0: tables DSDT FACP MCFG APIC
> > >> acpi0: wakeup devices EPA0(S3) EPA1(S3) PEX0(S5) PEX1(S5) PEX2(S5)
> > >> PEX3(S5)
> > >> HUB0(S5) PCI0(S5)
> > >> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> > >> acpimcfg0 at acpi0 addr 0xe000, bus 0-255
> > >> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> > >> cpu0 at mainbus0: apid 0 (boot processor)
> > >> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> > >> cpu0: apic clock running at 133MHz
> > >> ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins
> > >> acpiprt0 at acpi0: bus 0 (PCI0)
> > >> acpiprt1 at acpi0: bus 2 (EPA1)
> > >> acpiprt2 at acpi0: bus -1 (BR10)
> > >> acpiprt3 at acpi0: bus -1 (BR11)
> > >> acpiprt4

Re: kernel panic

2015-10-09 Thread Mike Larkin
On Fri, Oct 09, 2015 at 09:53:16AM +0200, Holger Glaess wrote:
> > On Fri, Oct 09, 2015 at 06:22:53AM +0200, Holger Glaess wrote:
> >> hi
> >>
> >> what kind of information you need more ?
> >>
> >
> > uhm. this machine is very very strange. It has devices I've never
> > seen before and many other devices not even recognized. Without access
> > to the hardware there's not much we can do here.
> >
> > You've posted about this machine in the past, and we've done our best
> > to help you but I think this may be a losing battle.
> >
> 
> hi
>  you mean physikal access or is connection by ssh also ok ?
> 
> ssh access  i can give you.
> 

I meant getting one of these boards in hand.

> 
> Holger
> 
> 
> >> holger
> >>
> >>
> >> Stopped at  0:ehci0: unrecoverable error, controller halted
> >> panic: kernel diagnostic assertion "ci->ci_fpcurproc == p" failed: file
> >> "../../../../arch/i386/isa/npx.c", line 881
> >>   Stopped at  Debugger+0x7:   leave
> >>TIDPIDUID PRFLAGS PFLAGS  CPU  COMMAND
> >> Debugger(d09fe02c,f51cfdd4,d09d8f30,f51cfdd4,d709bfc8) at Debugger+0x7
> >> panic(d09d8f30,d0957746,d0b0522f,d0b0532c,371) at panic+0x71
> >> __assert(d0957746,d0b0532c,371,d0b0522f,d0bbb160) at __assert+0x2e
> >> npxsave_proc(d7216744,0,f51cfe58,d03b9029,40) at npxsave_proc+0x5a
> >> cpu_exit(d7216744,d7215000,d709b00c,0,1) at cpu_exit+0x2a
> >> exit1(d7216744,4,1,d03b3844,40,4,1,0) at exit1+0x22c
> >> sigexit(d7216744,4,0,0,21fc000) at sigexit+0x76
> >> postsig(4,0,808f05d0,63,21de800) at postsig+0x28a
> >> userret(d7216744) at userret+0x49
> >> alltraps(,,,,) at alltraps+0x2e
> >> uvm_fault(0xd0bbb0a0, 0xd000, 0, 1) -> e
> >> kernel: page fault trap, code=0
> >> Stopped at  trap+0x18:  movl0x2c(%esi),%edi
> >>TIDPIDUID PRFLAGS PFLAGS  CPU  COMMAND
> >> trap() at trap+0x18
> >> --- trap (number 32) ---
> >> 0:
> >> http://www.openbsd.org/ddb.html describes the minimum info required in
> >> bug
> >> reports.  Insufficient info makes it difficult to find and fix bugs.
> >> ddb>
> >>
> >>
> >> OpenBSD 5.8-current (GENERIC) #1219: Thu Oct  8 07:55:22 MDT 2015
> >> dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
> >> cpu0: Genuine Intel(R) processor 1.20GHz ("GenuineIntel" 686-class) 1.21
> >> GHz
> >> cpu0:
> >> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,PBE,PERF
> >> real mem  = 1072041984 (1022MB)
> >> avail mem = 1038999552 (990MB)
> >> mpath0 at root
> >> scsibus0 at mpath0: 256 targets
> >> mainbus0 at root
> >> bios0 at mainbus0: date 07/06/09, BIOS32 rev. 0 @ 0xfa530, SMBIOS rev.
> >> 2.2 @
> >> 0xf0800 (39 entries)
> >> bios0: vendor Phoenix Technologies, LTD version "ANSA 3020 R01
> >> Jul,2,2009" date 07/06/2009
> >> acpi0 at bios0: rev 0
> >> acpi0: sleep states S0 S3 S4 S5
> >> acpi0: tables DSDT FACP MCFG APIC
> >> acpi0: wakeup devices EPA0(S3) EPA1(S3) PEX0(S5) PEX1(S5) PEX2(S5)
> >> PEX3(S5)
> >> HUB0(S5) PCI0(S5)
> >> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> >> acpimcfg0 at acpi0 addr 0xe000, bus 0-255
> >> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> >> cpu0 at mainbus0: apid 0 (boot processor)
> >> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> >> cpu0: apic clock running at 133MHz
> >> ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins
> >> acpiprt0 at acpi0: bus 0 (PCI0)
> >> acpiprt1 at acpi0: bus 2 (EPA1)
> >> acpiprt2 at acpi0: bus -1 (BR10)
> >> acpiprt3 at acpi0: bus -1 (BR11)
> >> acpiprt4 at acpi0: bus -1 (BR12)
> >> acpiprt5 at acpi0: bus -1 (BR13)
> >> acpiprt6 at acpi0: bus -1 (BR14)
> >> acpiprt7 at acpi0: bus 3 (P0P1)
> >> acpiprt8 at acpi0: bus -1 (PEX0)
> >> acpiprt9 at acpi0: bus -1 (PEX1)
> >> acpiprt10 at acpi0: bus -1 (PEX2)
> >> acpiprt11 at acpi0: bus -1 (PEX3)
> >> acpiprt12 at acpi0: bus -1 (HUB0)
> >> acpicpu0 at acpi0: C1(@1 halt!)
> >> acpitz0 at acpi0: critical temperature is 75 degC
> >> acpibtn0 at acpi0: PWRB
> >> bios0: ROM list: 0xc8000/0x4000! 0xcc000/0x2200! 0xef000/0x1000!
> >> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> >> pchb0 at pci0 dev 0 function 0 "Intel EP80579 Host" rev 0x01
> >> "Intel EP80579 Memory" rev 0x01 at pci0 dev 0 function 1 not configured
> >> "Intel EP80579 EDMA" rev 0x01 at pci0 dev 1 function 0 not configured
> >> ppb0 at pci0 dev 2 function 0 "Intel EP80579 PCIE" rev 0x01: apic 2 int
> >> 16
> >> pci1 at ppb0 bus 1
> >> em0 at pci1 dev 0 function 0 "Intel 82574L" rev 0x00: msi, address
> >> 00:14:b7:00:61:63
> >> ppb1 at pci0 dev 3 function 0 "Intel EP80579 PCIE" rev 0x01: apic 2 int
> >> 16
> >> pci2 at ppb1 bus 2
> >> ppb2 at pci0 dev 4 function 0 "Intel EP80579" rev 0x01
> >> pci3 at ppb2 bus 3
> >> em1 at pci3 dev 0 function 0 "Intel EP80579 LAN" rev 0x01: apic 2 int
> >> 16,
> >> address 00:14:b7:00:61:65
> >> em2 at pci3 dev 1 function 0 "Intel EP80579 LAN" rev 0x01: apic 2 int
> >> 17,
> >> address 

Re: requesting help working around boot failures with supermicro atom board

2015-09-15 Thread Mike Larkin
On Tue, Sep 15, 2015 at 07:16:40PM +, Dewey Hylton wrote:
> Dewey Hylton  gmail.com> writes:
> 
> > 
> > Mike Larkin  azathoth.net> writes:
> 
> > > acpidump please.
> > 
> > my pleasure:
> > 
> > [demime removed a uuencoded section named
> supermicro-X7SPE-HF-D525-acpidump.tgz which was 276 lines]
> > 
> > 
> 
> alright ... so this didn't work. i'll try to make the acpidump available via
> another site somewhere. on that note, the bios allows selection between acpi
> 1/2/3 - would it help at all to have acpidump for each of those three 
> settings?
> 

Sure.



Re: requesting help working around boot failures with supermicro atom board

2015-09-17 Thread Mike Larkin
On Thu, Sep 17, 2015 at 12:40:12PM +, Dewey Hylton wrote:
> Dewey Hylton  gmail.com> writes:
> 
> > 
> > Mike Larkin  azathoth.net> writes:
> > 
> > > 
> > > On Tue, Sep 15, 2015 at 07:16:40PM +, Dewey Hylton wrote:
> > > > Dewey Hylton  gmail.com> writes:
> > > > 
> > > > > 
> > > > > Mike Larkin  azathoth.net> writes:
> > > > 
> > > > > > acpidump please.
> 
> > motherboard: supermicro x7spe-hf-d525 rev 1.0
> > bios: 1.2b
> > 
> > at the end of this link is an archive containing acpidump output for all
> > three acpi settings in the bios (1.0, 2.0, 3.0). 
> > 
> > https://goo.gl/tWGL6C
> > 
> > i apologize for the somewhat hidden link; gmane wouldn't allow me to post
> > the full link because it's greater than 80 characters.
> > 
> > please let me know if i can help in any way; i honestly know nothing about
> > acpi but am willing to learn or assist otherwise if it means understanding
> > and potentially fixing this issue.
> 
> i was able to export the DSDT files into something human-readable. while i
> don't really understand much of what i'm seeing in the resulting text files,
> diff shows that the differences between the three acpi versions are
> nonexistent. i have no idea about the other files, of which there are several.
> 
> Mike, does the acpidump output help at all? if not, am i simply at the point
> where this hardware is not compatible with OpenBSD?
> 

Haven't had a chance to look at it yet.

-ml



Re: requesting help working around boot failures with supermicro atom board

2015-09-14 Thread Mike Larkin
On Fri, Sep 11, 2015 at 06:38:23PM -0400, dewey.hyl...@gmail.com wrote:
> hi all. i???m having difficulty with this board:
> 
> Supermicro X7SPE-HD-D525 rev1
> 
> i have several similar systems, each running an older version of OpenBSD for 
> a few years without incident. except this one ???
> 
> running OpenBSD 5.7 i386, from cold start it boots just fine and runs until 
> rebooted. once rebooted, however, prior to anything being displayed (i assume 
> this is early in the bios post phase) i get one very long beep. super micro 
> tells me this indicates inability to correctly initialize the memory. okay, 
> so i???ve changed memory for known working components and have the same 
> issue. at this point, the only thing that gets me booting again is to remove 
> power and then restore power. it then boots fine from cold start, and fails 
> on the next reboot (as in, ???reboot??? from the command line). once in 
> long-beep failure mode, neither the hardware reset button nor the power 
> button can make the machine boot again. the only thing that works is removing 
> power. every once in a while it will reboot successfully, only to fail in the 
> same manner on the next attempt.
> 
> super micro has had me flash bios, clear cmos, boot from different devices 
> and with nothing connected, etc. the results are the same: when rebooting 
> from openbsd, next boot fails until power is removed/restored. super micro 
> blames openbsd.
> 
> i installed linux (same hardware, overwrite openbsd 5.7) and scheduled a 
> reboot every 5 minutes and left it overnight. i logged 554 successful reboots.
> 
> i have since installed the latest available openbsd amd64 snapshot, and am 
> seeing the same failures.
> 
> i???m wondering if something could be disabled (boot -c ?) or if something 
> else raises a red flag and might have a workaround. this has me stumped. i 
> would very much appreciate a clue stick. 
> 
> dmesg follows:
> 

acpidump please.

> OpenBSD 5.8-current (GENERIC.MP) #1364: Wed Sep  9 17:32:01 MDT 2015
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 4277665792 (4079MB)
> avail mem = 4144070656 (3952MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S1 S4 S5
> acpi0: tables DSDT FACP APIC MCFG OEMB HPET EINJ BERT ERST HEST
> acpi0: wakeup devices P0P1(S4) PS2K(S4) PS2M(S4) USB0(S4) USB1(S4) USB2(S4) 
> USB5(S4) EUSB(S4) USB3(S4) USB4(S4) USB6(S4) USBE(S4) P0P4(S4) P0P5(S4) 
> P0P6(S4) P0P7(S4) [...]
> 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) Atom(TM) CPU D525 @ 1.80GHz, 1800.23 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR
> cpu0: 512KB 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 199MHz
> cpu0: mwait min=64, max=64, C-substates=0.1, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Atom(TM) CPU D525 @ 1.80GHz, 1800.00 MHz
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR
> cpu1: 512KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 1 (application processor)
> cpu2: Intel(R) Atom(TM) CPU D525 @ 1.80GHz, 1800.00 MHz
> cpu2: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR
> cpu2: 512KB 64b/line 8-way L2 cache
> cpu2: smt 1, core 0, package 0
> cpu3 at mainbus0: apid 3 (application processor)
> cpu3: Intel(R) Atom(TM) CPU D525 @ 1.80GHz, 1800.00 MHz
> cpu3: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR
> cpu3: 512KB 64b/line 8-way L2 cache
> cpu3: smt 1, core 1, package 0
> ioapic0 at mainbus0: apid 4 pa 0xfec0, version 20, 24 pins
> ioapic0: misconfigured as apic 1, remapped to apid 4
> acpimcfg0 at acpi0 addr 0xe000, bus 0-255
> acpihpet0 at acpi0: 14318179 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 4 (P0P1)
> acpiprt2 at acpi0: bus 1 (P0P4)
> acpiprt3 at acpi0: bus 2 (P0P8)
> acpiprt4 at acpi0: bus 3 (P0P9)
> acpicpu0 at acpi0: C1(@1 halt!)
> acpicpu1 at acpi0: C1(@1 halt!)
> acpicpu2 at acpi0: C1(@1 halt!)
> acpicpu3 at acpi0: C1(@1 halt!)
> acpibtn0 at acpi0: SLPB
> acpibtn1 at acpi0: PWRB
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 

Re: Suspend on Macbook Pro Retina (MacbookPro 11,1)

2015-12-06 Thread Mike Larkin
On Fri, Dec 04, 2015 at 03:33:10PM -0500, Bryan C. Everly wrote:
> Hi everyone,
> 
> With the latest snapshot installed, I can confirm that this machine will
> (sort of) suspend.  Unfortunately it won't wake up.
> 
> When it suspends (via 'zzz' from the console), the screen turns off.
> However, the keyboard backlight, the USB network adapter I'm using, and the
> "red cylon eye" in the headphone jack are all still active.
> 
> Any information I can provide to help further the cause here?  Anyone who
> is willing to work with me to help figure out how we can unlock more of the
> potential in this hardware?
> 
> Thanks,
> Bryan
>

Considering that you didn't even give us a dmesg ...

man sendbug



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: 

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: NOT POSSIBLE: Fully encrypted system with keydisk

2015-12-11 Thread Mike Larkin
On Sat, Dec 12, 2015 at 12:27:46AM +0100, Stefan Wollny wrote:
> Am 12/11/15 um 18:34 schrieb Stefan Sperling:
> >On Fri, Dec 11, 2015 at 05:44:36PM +0100, Stefan Wollny wrote:
> >>fdisk(25692): syscall 54 "ioctl"
> >>Abort trap
> >>>   disklabel sd3
> >>disklabel(3120): syscall 54 "ioctl"
> >>Abort trap
> >This is obviously not quite right.
> >It looks like you're using a snapshot with a pledge(2) bug.
> >
> >What snapshot are you booting? Please ensure that you're either
> >booting 5.8 or the latest snapshot and send a complete dmesg
> >if it is still failing.
> A couple of test iterations later ...
> 
> [TLDR: Still no reboot into an unencrypted system]
> 
> 
> These are the steps (annotated) I went through:
> 
> 
> 
> +++
> s
> 
> Prior to running bsr.rd check the chain of boot devices,
> has to be CD => sd0 => PXE
> 's' to choose "shell"
> fdisk sd0 => OK
> fdisk sd1 => not OK
> fdisk sd2 => not OK
> cd /dev
> sh ./MAKEDEV sd1
> sh ./MAKEDEV sd2
> cd /
> fdisk -iy sd0
> fdisk -iy sd1
> fdisk -iy sd2
> disklabel -E sd0
> entire HD: FS type RAID, partition 'd'
> disklabel -E sd1
> entire HD: FS type RAID, partition 'e'
> disklabel -E sd2
> partition 'd', size 1M, FS type RAID
> partition 'e', size 1M, FS type RAID
> partition 'f', size 1M, FS type RAID
> partition 'g', size 1M, FS type RAID
> partition 'h', size 1M, FS type RAID
> partition 'i', size , FS type 4.2BSD
> bioctl -c C -l /dev/sd0d -k /dev/sd2d softraid0
> bioctl -c C -l /dev/sd1e -k /dev/sd2e softraid0
> cd /dev
> sh ./MAKEDEV sd3
> sh ./MAKEDEV sd4
> cd /
> dd if=/dev/zero of=/dev/rsd3c bs=1m count=1
> dd if=/dev/zero of=/dev/rsd4c bs=1m count=1
> fdisk -iy sd3
> fdisk -iy sd4
> install
> [ ... usual install process ... ]
> /mnt/usr/sbin/installboot -v -r /mnt sd3

The installer will detect your install target is softraid crypto
and do that automatically. Why are you re-doing this again?

-ml

> newfs sd2i
> mount /dev/sd2i /mnt2
> dmesg > /mnt2/dmesg.txt
> fdisk sd0 > /mnt2/fdisk-sd0.txt
> fdisk sd1 > /mnt2/fdisk-sd1.txt
> fdisk sd2 > /mnt2/fdisk-sd2.txt
> fdisk sd3 > /mnt2/fdisk-sd3.txt
> fdisk sd4 > /mnt2/fdisk-sd4.txt
> 
> fdisk sd0 > /mnt2/fdisk-sd0.txt
> fdisk sd1 > /mnt2/fdisk-sd1.txt
> fdisk sd2 > /mnt2/fdisk-sd2.txt
> fdisk sd3 > /mnt2/fdisk-sd3.txt
> fdisk sd4 > /mnt2/fdisk-sd4.txt
> 
> bioctl sd3 > /mnt2/bioctl-sd3.txt
> 
> reboot



Re: NOT POSSIBLE: Fully encrypted system with keydisk

2015-12-11 Thread Mike Larkin
On Sat, Dec 12, 2015 at 12:51:33AM +0100, Stefan Wollny wrote:
> 
> 
> Gesendet??von??meinem??BlackBerry??10-Smartphone.
> ?? Originalnachricht ??
> ???On Sat, Dec 12, 2015 at 12:27:46AM +0100, Stefan Wollny wrote:
> > Am 12/11/15 um 18:34 schrieb Stefan Sperling:
> > >On Fri, Dec 11, 2015 at 05:44:36PM +0100, Stefan Wollny wrote:
> > >>fdisk(25692): syscall 54 "ioctl"
> > >>Abort trap
> > >>> disklabel sd3
> > >>disklabel(3120): syscall 54 "ioctl"
> > >>Abort trap
> > >This is obviously not quite right.
> > >It looks like you're using a snapshot with a pledge(2) bug.
> > >
> > >What snapshot are you booting? Please ensure that you're either
> > >booting 5.8 or the latest snapshot and send a complete dmesg
> > >if it is still failing.
> > A couple of test iterations later ...
> > 
> > [TLDR: Still no reboot into an unencrypted system]
> > 
> > 
> > These are the steps (annotated) I went through:
> > 
> > 
> > 
> > +++
> > s
> > 
> > Prior to running bsr.rd check the chain of boot devices,
> > has to be CD => sd0 => PXE
> > 's' to choose "shell"
> > fdisk sd0 => OK
> > fdisk sd1 => not OK
> > fdisk sd2 => not OK
> > cd /dev
> > sh ./MAKEDEV sd1
> > sh ./MAKEDEV sd2
> > cd /
> > fdisk -iy sd0
> > fdisk -iy sd1
> > fdisk -iy sd2
> > disklabel -E sd0
> > entire HD: FS type RAID, partition 'd'
> > disklabel -E sd1
> > entire HD: FS type RAID, partition 'e'
> > disklabel -E sd2
> > partition 'd', size 1M, FS type RAID
> > partition 'e', size 1M, FS type RAID
> > partition 'f', size 1M, FS type RAID
> > partition 'g', size 1M, FS type RAID
> > partition 'h', size 1M, FS type RAID
> > partition 'i', size , FS type 4.2BSD
> > bioctl -c C -l /dev/sd0d -k /dev/sd2d softraid0
> > bioctl -c C -l /dev/sd1e -k /dev/sd2e softraid0
> > cd /dev
> > sh ./MAKEDEV sd3
> > sh ./MAKEDEV sd4
> > cd /
> > dd if=/dev/zero of=/dev/rsd3c bs=1m count=1
> > dd if=/dev/zero of=/dev/rsd4c bs=1m count=1
> > fdisk -iy sd3
> > fdisk -iy sd4
> > install
> > [ ... usual install process ... ]
> > /mnt/usr/sbin/installboot -v -r /mnt sd3
> 
> The installer will detect your install target is softraid crypto
> and do that automatically. Why are you re-doing this again?
> 
> -ml
> 
> I was adviced to do so. With or without the system doesn't reboot but stopps 
> at the machine's splash screen for not finding a boot device. 
> 
> STEFAN ???

I'd try with a simpler config first, like just making a single softraid crypto
device, without a keydisk. See if that works first before moving on to more
complex configurations.

-ml



Re: dmesg: notebook hp pavilion dm3 1110eg 13.3"

2015-12-16 Thread Mike Larkin
On Tue, Dec 15, 2015 at 10:14:23AM +0100, Marcus MERIGHI wrote:
> CCing misc@ because there's no public access to dmesg@.
> 
> BIOS: older machine, nothing fancy
> Xwin: works, incl. touchpad
> Suspend: works without Xwin only
> Resume: does not work, regardless of Xwin

I love these reports that attempt to use the fewest words possible.
It's like taking your car to the mechanic and saying "does not work", and 
letting
them try to figure out what exactly is broken, without providing any
symptoms or other explanation.

-ml

> WLAN: works. fw_update fetched firmware for athn0 via athn0
> 
> dmesg, X.org.log, pcidump, usbdevs, sysctl hw, ifconfig, xdpyinfo,
> xrandr, product specs below.
> 
> OpenBSD 5.8 (GENERIC.MP) #1236: Sun Aug 16 02:31:04 MDT 2015
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> RTC BIOS diagnostic error 80
> real mem = 2931224576 (2795MB)
> avail mem = 2838556672 (2707MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe9260 (27 entries)
> bios0: vendor Insyde Corp. version "F.29" date 06/09/2010
> bios0: Hewlett-Packard HP Pavilion dm3 Notebook PC
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP HPET APIC MCFG BOOT SLIC SSDT
> acpi0: wakeup devices SLPB(S3) LID_(S3) PB2_(S4) PB4_(S5) PB5_(S4) PB6_(S5) 
> PB7_(S4) PB9_(S5) PB10(S5) AZAL(S3) USB0(S3) USB1(S3) USB5(S3) P2P_(S5)
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpihpet0 at acpi0: 14318180 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: AMD Athlon(tm) Neo X2 Dual Core Processor L335, 1596.22 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,3DNOWP
> cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 256KB 
> 64b/line 16-way L2 cache
> cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 199MHz
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: AMD Athlon(tm) Neo X2 Dual Core Processor L335, 1595.95 MHz
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,3DNOWP
> cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 256KB 
> 64b/line 16-way L2 cache
> cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> cpu1: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
> ioapic0 at mainbus0: apid 4 pa 0xfec0, version 21, 24 pins
> ioapic0: misconfigured as apic 0, remapped to apid 4
> acpimcfg0 at acpi0 addr 0xf700, bus 0-15
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 1 (AGP_)
> acpiprt2 at acpi0: bus 2 (PB2_)
> acpiprt3 at acpi0: bus 3 (PB4_)
> acpiprt4 at acpi0: bus 9 (PB5_)
> acpiprt5 at acpi0: bus -1 (PB6_)
> acpiprt6 at acpi0: bus -1 (PB7_)
> acpiprt7 at acpi0: bus -1 (PB9_)
> acpiprt8 at acpi0: bus -1 (PB10)
> acpiprt9 at acpi0: bus 10 (P2P_)
> acpiec0 at acpi0
> acpicpu0 at acpi0: C1(@1 halt!), PSS
> acpicpu1 at acpi0: C1(@1 halt!), PSS
> acpitz0 at acpi0: critical temperature is 100 degC
> acpibtn0 at acpi0: PWRB
> acpibtn1 at acpi0: SLPB
> acpibtn2 at acpi0: LID_
> acpiac0 at acpi0: AC unit offline
> acpibat0 at acpi0: BAT0 model "5160" serial Li4402A type Li oem " 
> Hewlett-Packard "
> acpivideo0 at acpi0: VGA_
> acpivideo1 at acpi0: VGA_
> cpu0: PowerNow! K8 1596 MHz: speeds: 1600 800 MHz
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "AMD RS780 Host" rev 0x00
> ppb0 at pci0 dev 1 function 0 "AMD RS780 PCIE" rev 0x00
> pci1 at ppb0 bus 1
> radeondrm0 at pci1 dev 5 function 0 "ATI Radeon HD 3200" rev 0x00
> drm0 at radeondrm0
> radeondrm0: apic 4 int 18
> ppb1 at pci0 dev 2 function 0 "AMD RS780 PCIE" rev 0x00: msi
> pci2 at ppb1 bus 2
> radeondrm1 at pci2 dev 0 function 0 "ATI Mobility Radeon HD 4300" rev 0x00
> drm1 at radeondrm1
> radeondrm1: msi
> azalia0 at pci2 dev 0 function 1 "ATI Radeon HD 4000 HD Audio" rev 0x00: msi
> azalia0: no supported codecs
> ppb2 at pci0 dev 4 function 0 "AMD RS780 PCIE" rev 0x00: msi
> pci3 at ppb2 bus 3
> 3:0:0: mem address conflict 0xfffe/0x2
> re0 at pci3 dev 0 function 0 "Realtek 8101E" rev 0x02: RTL8102EL (0x2480), 
> msi, address 00:21:cc:50:1a:a3
> rlphy0 at re0 phy 7: RTL8201L 10/100 PHY, rev. 1
> ppb3 at pci0 dev 5 function 0 "AMD RS780 PCIE" rev 0x00: msi
> pci4 at ppb3 bus 9
> athn0 at pci4 dev 0 function 0 "Atheros AR9285" rev 0x01: apic 4 int 17
> athn0: AR9285 rev 2 (1T1R), ROM rev 14, address c4:46:19:7d:f9:70
> ahci0 at pci0 dev 17 function 0 "ATI SBx00 SATA" rev 0x00: apic 4 int 22, 
> AHCI 1.1
> ahci0: port 0: 

Re: High interrupt load using 5.8 Release GENERIC i386 on Acer Aspire 3630 laptop

2016-01-03 Thread Mike Larkin
On Sun, Dec 27, 2015 at 01:55:30PM +, peter.foster.li...@gmail.com wrote:
> Hi,
> 
> I have installed 5.8 Release GENERIC i386 on an Acer Aspire 3630
> laptop. Even when the system is almost completely idle, `top'
> consistently reports an interrupt load in the range 75%--80%.
> Admittedly this hardware is more than 8 years old, nevertheless I
> believe the load is unusually high, based on limited experience with
> installing the same version of OpenBSD on a lower-spec i586 machine.
> Is it possible that CPU cycles are being wasted due to the system
> being mis-configured? If so, does anyone have any suggestions on how
> to reduce the observed load?

Can you build a kernel with ACPI_DEBUG enabled and try that?

We've seen stuck GPEs in the past, and judging that you have only seen
a single (eg, 1) ACPI interrupt, that's a bit suspect.

-ml

> 
> dmesg:
> 
> OpenBSD 5.8 (GENERIC) #0: Sat Dec 26 21:32:37 GMT 2015
> pe...@rebelene.home:/usr/src/sys/arch/i386/compile/GENERIC
> cpu0: Intel(R) Celeron(R) M processor 1.60GHz ("GenuineIntel"
> 686-class) 1.61 GHz
> cpu0: 
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,PBE,NXE,PERF
> real mem  = 467091456 (445MB)
> avail mem = 445419520 (424MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: date 03/20/06, BIOS32 rev. 0 @ 0xfd600, SMBIOS rev.
> 2.31 @ 0x1bdfb000 (35 entries)
> bios0: vendor Acer version "3A22" date 03/20/06
> bios0: Acer, inc. Aspire 3630
> acpi0 at bios0: rev 0
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP APIC SSDT
> acpi0: wakeup devices PCI0(S5) LAN_(S5) MODM(S3) KBC_(S4) USB0(S3)
> USB1(S3) USB2(S3) USB3(S3)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> ioapic0 at mainbus0: apid 1 pa 0xfec0, version 11, 24 pins
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiec0 at acpi0
> acpicpu0 at acpi0: !C3(@900 io@0x8015), !C2(@90 io@0x8014), C1(@1 halt!)
> acpitz0 at acpi0: critical temperature is 97 degC
> acpiac0 at acpi0: AC unit online
> acpibat0 at acpi0: BAT1 not present
> acpibtn0 at acpi0: LID_
> acpibtn1 at acpi0: PWRB
> acpibtn2 at acpi0: SLPB
> bios0: ROM list: 0xc/0xc000 0xcc000/0xa000! 0xdc000/0x8000!
> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> pchb0 at pci0 dev 0 function 0 "SiS 661 PCI" rev 0x11
> sisagp0 at pchb0
> agp0 at sisagp0: aperture at 0xe000, size 0x200
> ppb0 at pci0 dev 1 function 0 "SiS 648FX AGP" rev 0x00
> pci1 at ppb0 bus 1
> vga1 at pci1 dev 0 function 0 "SiS 6330 VGA" rev 0x00
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> pcib0 at pci0 dev 2 function 0 "SiS 85C503 System" rev 0x25
> pciide0 at pci0 dev 2 function 5 "SiS 5513 EIDE" rev 0x00: 661: DMA,
> channel 0 configured to compatibility, channel 1 configured to
> compatibility
> wd0 at pciide0 channel 0 drive 0: 
> wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors
> wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
> 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
> "SiS 7013 Modem" rev 0xa0 at pci0 dev 2 function 6 not configured
> auich0 at pci0 dev 2 function 7 "SiS 7012 AC97" rev 0xa0: apic 1 int
> 18, SiS7012 AC97
> ac97: codec id 0x414c4770 (Avance Logic ALC203 rev 0)
> ac97: codec features headphone, 20 bit DAC, 18 bit ADC, No 3D Stereo
> audio0 at auich0
> ohci0 at pci0 dev 3 function 0 "SiS 5597/5598 USB" rev 0x0f: apic 1
> int 20, version 1.0, legacy support
> ohci1 at pci0 dev 3 function 1 "SiS 5597/5598 USB" rev 0x0f: apic 1
> int 21, version 1.0, legacy support
> ehci0 at pci0 dev 3 function 3 "SiS 7002 USB" rev 0x00: apic 1 int 23
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 "SiS EHCI root hub" rev 2.00/1.00 addr 1
> sis0 at pci0 dev 4 function 0 "SiS 900 10/100BaseTX" rev 0x91: apic 1
> int 19, address 00:16:36:58:b8:c3
> rlphy0 at sis0 phy 13: RTL8201L 10/100 PHY, rev. 1
> cbb0 at pci0 dev 6 function 0 "ENE CB-1410 CardBus" rev 0x01: apic 1 int 19
> bwi0 at pci0 dev 11 function 0 "Broadcom BCM4318" rev 0x02: apic 1 int
> 17, address 00:16:ce:59:63:f8
> isa0 at pcib0
> isadma0 at isa0
> pckbc0 at isa0 port 0x60/5 irq 1 irq 12
> pckbd0 at pckbc0 (kbd slot)
> wskbd0 at pckbd0: console keyboard, using wsdisplay0
> pms0 at pckbc0 (aux slot)
> wsmouse0 at pms0 mux 0
> pms0: Synaptics touchpad, firmware 6.2
> pcppi0 at isa0 port 0x61
> spkr0 at pcppi0
> npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
> usb1 at ohci0: USB revision 1.0
> uhub1 at usb1 "SiS OHCI root hub" rev 1.00/1.00 addr 1
> usb2 at ohci1: USB revision 1.0
> uhub2 at usb2 "SiS OHCI root 

Re: text-mode gui

2015-12-22 Thread Mike Larkin
On Tue, Dec 22, 2015 at 09:57:46PM +, Tati Chevron wrote:
> On Tue, Dec 22, 2015 at 02:00:26PM -0700, Theo de Raadt wrote:
> >>But I still maintain that putting an option in the installer to create
> >>softraid crypto volumes automatically just dumbs down OpenBSD
> >>unnecessarily, and encourages people to be lazy instead of learning how
> >>to use the system to it's full potential.
> >
> >It's great that you have an opinion.
> >
> >Unfortunately it is the wrong opinion.
> 
> That's just your opinion.
> 
> The OpenBSD defaults are VERY wrong for my needs.  But I've fixed that for
> myself.  I don't come whining on -misc asking for my hand to be held every
> time something breaks.
> 
> -- 
> Tati Chevron
> Perl and FORTRAN specialist.
> SWABSIT development and migration department.
> http://www.swabsit.com
>

And yet you whine when people offer suggestions to make improvements (eg,
the recent multitouch discussion).



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 

Re: vmmctl and vmd problem

2015-12-01 Thread Mike Larkin
On Sat, Nov 28, 2015 at 09:46:36AM +, freeu...@ruggedinbox.com wrote:
> 26 Nov 2015 at 21:10:06, Norman Golisz  wrote:
> >This is expected. vmm(4) is not yet enabled in the default kernel
> >configuration.
> 
> Thanks for your hints:)
> 
> I tried "config -e -f /bsd", then "list" & "find vm".
> no result, OpenBSD amd64 snapshots in 28 Nov 2015.
> 
> vmm, vmd, vmmctl on snapshots, and "man vmd" said "vmd_flags=" in
> "/etc/rc.conf.local".
> but, "/etc/rc.conf" and "/etc/rc" didn't in these codes. :<
> 
> 
> I should be compile the kernel "-current" ?
> 

This is still under active development. You would need to use
a custom config to enable the option.



Re: Virtualization: vmm with Linux guests - when?

2015-11-21 Thread Mike Larkin
On Tue, Nov 17, 2015 at 03:46:59PM +, Luis P. Mendes wrote:
>   Hi,
> 
>   I know that development time is not a determinisc thing, but
>   nonetheless I'd like to know if it's closer to one, six, twelve (or
>   more) months until we get the possibility to run Linux guests
>   through vmm.

No idea.

There are about 100 other things that are more important to me than
running Linux guests. And those 100 things will have my attention before
I focus even one minute on working through Linux guest support.

If *you* wanted to take on the challenge, I'd say the first thing that
needs to be done would be the bootloader, once I get the rest of the
userland bits in. Once committed, go look at usr.sbin/vmd/loadfile_elf.c
and retrofit it to be able to load a linux kernel with proper kernel
args/cmdline support, then come back with your diff.

-ml

> 
>   I'd be happy even without a graphical interface, if the clients can
>   run in xvfb mode and have graphical connections via VNC.
> 
>   What about hardware pass-through?  I don't recall to have read about
>   this.  Is it something that is already possible?
> 
>   Thanks in advance for any info on this.
>  
> 
> -- 
> 
> 
> Luis Mendes



Re: Laptop Dell vostro 1500 hang after suspend/resume

2016-01-10 Thread Mike Larkin
On Sun, Jan 10, 2016 at 06:07:58PM +0100, Sol??ne Rapenne wrote:
> Hello,
> 
> I am using a Dell Vostro 1500, apmd is started with -A flag
> and when I type "zzz" to enter in suspend mode everything
> seems to works as expected.
> 
> But when I resume it, the screen stays black, the backlight
> of the screen enables, the power LED show that it's no longer
> in sleep mode and the HDD led doesn't show any activity.
> The computer can't be pinged via network after resume (using
> ethernet or wireless).
> 
> This is reproducible on 5.8 and current with my computer.
> 

1. did it ever work, and if so when?
2. if it did work, please bisect diffs to find out when it broke
(this is not a crazy machine with weird hardware so it probably
worked at some time)
3. try ZZZ instead
4. disable devices (I'd start with usb and go from there) and
see if that helps.
5. if your machine has a visible LED to indicate sleeping,
move the call to acpi_indicator(sc, ACPI_SST_WAKING) later in
the resume sequence to let you know what's going on
6. do a proper sendbug

-ml 

> 
> Here is the dmesg
> 
> OpenBSD 5.9-beta (GENERIC.MP) #1804: Fri Jan  8 23:49:58 MST 2016
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 2120667136 (2022MB)
> avail mem = 2052325376 (1957MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf7180 (45 entries)
> bios0: vendor Dell Inc. version "A06" date 04/21/2008
> bios0: Dell Inc. Vostro 1500
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP HPET APIC MCFG SLIC BOOT SSDT
> acpi0: wakeup devices PCI0(S3) PCIE(S4) USB1(S0) USB2(S0) USB3(S0) USB4(S0)
> USB5(S0) EHC2(S0) EHCI(S0) AZAL(S3) RP01(S3) RP02(S3) RP03(S3) RP04(S3)
> RP05(S3) RP06(S3) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 14318179 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM)2 Duo CPU T5270 @ 1.40GHz, 966.09 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
> cpu0: 2MB 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 199MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Core(TM)2 Duo CPU T5270 @ 1.40GHz, 927.58 MHz
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
> cpu1: 2MB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
> ioapic0: misconfigured as apic 0, remapped to apid 2
> acpimcfg0 at acpi0 addr 0xf800, bus 0-63
> acpiprt0 at acpi0: bus 3 (PCIE)
> acpiprt1 at acpi0: bus -1 (AGP_)
> acpiprt2 at acpi0: bus 11 (RP01)
> acpiprt3 at acpi0: bus 12 (RP02)
> acpiprt4 at acpi0: bus -1 (RP03)
> acpiprt5 at acpi0: bus 13 (RP04)
> acpiprt6 at acpi0: bus -1 (RP05)
> acpiprt7 at acpi0: bus -1 (RP06)
> acpiprt8 at acpi0: bus 0 (PCI0)
> acpicpu0 at acpi0: !C3(100@57 mwait.3@0x30), !C2(500@1 mwait.1@0x10),
> C1(1000@1 mwait.1), PSS
> acpicpu1 at acpi0: !C3(100@57 mwait.3@0x30), !C2(500@1 mwait.1@0x10),
> C1(1000@1 mwait.1), PSS
> acpitz0 at acpi0: critical temperature is 99 degC
> acpibtn0 at acpi0: LID_
> acpibtn1 at acpi0: PBTN
> acpibtn2 at acpi0: SBTN
> acpiac0 at acpi0: AC unit online
> acpibat0 at acpi0: BAT0 not present
> acpivideo0 at acpi0: VID_
> acpivideo1 at acpi0: VID_
> acpivout0 at acpivideo1: LCD_
> acpivideo2 at acpi0: VID2
> cpu0: Enhanced SpeedStep 966 MHz: speeds: 1401, 1400, 1200, 800 MHz
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel GM965 Host" rev 0x0c
> inteldrm0 at pci0 dev 2 function 0 "Intel GM965 Video" rev 0x0c
> drm0 at inteldrm0
> intagp0 at inteldrm0
> agp0 at intagp0: aperture at 0xe000, size 0x1000
> inteldrm0: msi
> inteldrm0: 1280x800
> wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
> wsdisplay0: screen 1-5 added (std, vt100 emulation)
> "Intel GM965 Video" rev 0x0c at pci0 dev 2 function 1 not configured
> uhci0 at pci0 dev 26 function 0 "Intel 82801H USB" rev 0x02: apic 2 int 20
> uhci1 at pci0 dev 26 function 1 "Intel 82801H USB" rev 0x02: apic 2 int 21
> ehci0 at pci0 dev 26 function 7 "Intel 82801H USB" rev 0x02: apic 2 int 22
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
> azalia0 at pci0 dev 27 function 0 "Intel 82801H HD Audio" rev 0x02: msi
> azalia0: codecs: Sigmatel STAC9205X, Conexant/0x2c06, using Sigmatel
> STAC9205X
> audio0 at azalia0
> ppb0 at pci0 dev 28 function 0 "Intel 82801H PCIE" rev 0x02: msi
> pci1 at 

Re: Suspend / hibernate does not work

2016-05-27 Thread Mike Larkin
On Fri, May 27, 2016 at 04:09:21PM +, Martin Oppegaard wrote:
> Hi,
> 
> I can't get suspend or hibernate to work with this computer.  It has
> encrypted root hdd and apmd is running (-A).  When I suspend the screen
> goes into standby and the power LED starts blinking, but nothing spins
> down (same amount of power is drawn from the UPS), and it will not
> resume.  In this state if I press the restart button the CPU fan calms
> down and less power is drawn from the UPS, but I have to hold the power
> button to shut it down.
> 
> With hibernate, it restarts immediately.
> 
> Any tips?
> 
> Regards,
> 
> Martin Oppegaard

When I was first starting the initial hibernate coding, I used this exact
same machine (P6T Deluxe V2), and ran into the exact same problems you did.
I even had a similar radeon (I think mine was a 5950). It worked occasionally,
but was never stable.

I was never able to track down what was failing. This MB was one of
the first ones to support the core-i* series and had a fair number of BIOS
bugs. I upgraded the BIOS, and things got worse (random reboots and hangs)
and when I downgraded the BIOS, I bricked the machine. After that, it got
tossed in the trash.

Sorry I don't have better news for you.

-ml

> 
> OpenBSD 5.9 (GENERIC.MP) #4: Thu May 19 08:22:39 CEST 2016
> 
> jas...@stable-59-amd64.mtier.org:/binpatchng/work-binpatch59-amd64/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 6416760832 (6119MB)
> avail mem = 6218088448 (5930MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xf0700 (81 entries)
> bios0: vendor American Megatrends Inc. version "1202" date 12/22/2010
> bios0: ASUSTeK Computer INC. P6T DELUXE V2
> acpi0 at bios0: rev 0
> acpi0: sleep states S0 S1 S3 S4 S5
> acpi0: tables DSDT FACP APIC MCFG OEMB HPET OSFR SSDT
> acpi0: wakeup devices NPE2(S4) NPE4(S4) NPE5(S4) NPE6(S4) NPE8(S4) NPE9(S4) 
> NPEA(S4) P0P1(S4) PS2K(S4) PS2M(S4) USB0(S4) USB1(S4) USB2(S4) USB5(S4) 
> EUSB(S4) USB3(S4) [...]
> 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) i7 CPU 920 @ 2.67GHz, 2673.08 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR
> 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 133MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz, 2672.73 MHz
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 4 (application processor)
> cpu2: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz, 2672.73 MHz
> cpu2: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR
> cpu2: 256KB 64b/line 8-way L2 cache
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 6 (application processor)
> cpu3: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz, 2672.73 MHz
> cpu3: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR
> cpu3: 256KB 64b/line 8-way L2 cache
> cpu3: smt 0, core 3, package 0
> cpu4 at mainbus0: apid 1 (application processor)
> cpu4: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz, 2672.73 MHz
> cpu4: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR
> cpu4: 256KB 64b/line 8-way L2 cache
> cpu4: smt 1, core 0, package 0
> cpu5 at mainbus0: apid 3 (application processor)
> cpu5: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz, 2672.73 MHz
> cpu5: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR
> cpu5: 256KB 64b/line 8-way L2 cache
> cpu5: smt 1, core 1, package 0
> cpu6 at mainbus0: apid 5 (application processor)
> cpu6: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz, 2672.73 MHz
> cpu6: 
> 

Re: HP 1020 G1 OpenBSD 6.0 Beta status and dmesg

2016-06-15 Thread Mike Larkin
On Wed, Jun 15, 2016 at 09:47:35AM +0200, Bodie wrote:
> Hi all,
> 
> trying to find if OpenBSD will be usable on this laptop via USB live OpenBSD
> 6.0 Beta install. There was some fight with old USB flash and EFI, but is
> already resolved so that I can provide some outputs and info.
> 
> 1) VGA works including 3D
> 2) USB camera is detected (I have firmware on flash disk), but video(1) does
> not work with it, will play more later on
> 3) ACPI/apm seems reasonable , but reported battery life is only around 231
> minutes (when regular is around 8 hours), except of boot CPU other threads
> have problems with identification, but scaling and load is ok and acpitz5

This probably happens only when booting off battery, right? (Eg, the "failed
to identify" messages). If you boot when plugged in to AC, I bet it doesn't do
that.

> zone is showing somewhat suspicious high temperature right from start
> 
> hw.sensors.cpu0.temp0=42.00 degC
> hw.sensors.acpitz0.temp0=43.00 degC (zone temperature)
> hw.sensors.acpitz1.temp0=0.00 degC (zone temperature)
> hw.sensors.acpitz2.temp0=37.00 degC (zone temperature)
> hw.sensors.acpitz3.temp0=40.00 degC (zone temperature)
> hw.sensors.acpitz4.temp0=35.00 degC (zone temperature)
> hw.sensors.acpitz5.temp0=84.00 degC (zone temperature)
> hw.sensors.acpitz6.temp0=0.00 degC (zone temperature)
> hw.sensors.acpitz7.temp0=0.00 degC (zone temperature)
> hw.sensors.acpibat0.volt0=7.60 VDC (voltage)
> hw.sensors.acpibat0.volt1=8.57 VDC (current voltage)
> hw.sensors.acpibat0.current0=1.21 A (rate)
> hw.sensors.acpibat0.amphour0=4.66 Ah (last full capacity)
> hw.sensors.acpibat0.amphour1=0.20 Ah (warning capacity)
> hw.sensors.acpibat0.amphour2=0.10 Ah (low capacity)
> hw.sensors.acpibat0.amphour3=4.66 Ah (remaining capacity), OK
> hw.sensors.acpibat0.amphour4=4.66 Ah (design capacity)
> hw.sensors.acpibat0.raw0=1 (battery full), OK
> hw.sensors.acpiac0.indicator0=Off (power supply)
> hw.sensors.acpibtn1.indicator0=On (lid open)
> 
> $ cat apm.txt
> Battery state: high, 100% remaining, 231 minutes life estimate
> A/C adapter state: not connected
> Performance adjustment mode: auto (500 MHz)
> $
> 
> Can provide acpidump directly from OpenBSD later on if some developer will
> be interested. Right now I have them only from Windows via iasl in .dat and
> .dsl format
> 
> 4) Network devices are detected, but iwm0 does not work properly (do not
> know if firmware or driver related). I am able to associate with AP, but
> dhclient is not getting any lease. Thought it may be related to 802.11n
> usage as my AP transmit in yet unsupported way by OpenBSD so I switched to
> 802.11g only, but the problem with dhclient was same. No errors either from
> dhclient or firmware of iwm0 during those steps
> 
> 5) dmesg of 1st boot after install
> 
> OpenBSD 6.0-beta (GENERIC.MP) #2165: Thu Jun  2 08:37:59 MDT 2016
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 8203530240 (7823MB)
> avail mem = 7950278656 (7581MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x9ba3f000 (33 entries)
> bios0: vendor Hewlett-Packard version "M77 Ver. 01.11" date 01/18/2016
> bios0: Hewlett-Packard HP EliteBook Folio 1020 G1
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP HPET APIC MCFG TCPA SSDT SSDT SLIC MSDM FPDT BGRT
> SSDT SSDT SSDT SSDT SSDT SSDT ASF! DMAR
> acpi0: wakeup devices LANC(S0) EHC1(S0) XHC_(S0) PCIB(S5) RP03(S0) NIC_(S0)
> RP04(S5) WNIC(S5) HST1(S5)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 14318179 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) M-5Y71 CPU @ 1.20GHz, 1097.63 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST
> ,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AV
> X2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,PT,SENSOR,ARAT
> cpu0: 256KB 64b/line 8-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Core(TM) M-5Y71 CPU @ 1.20GHz, 1097.46 MHz
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST
> ,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AV
> X2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,PT,SENSOR,ARAT
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: failed to 

Re: iwn WiFi slow in CURRENT

2016-02-04 Thread Mike Larkin
On Thu, Feb 04, 2016 at 06:24:42PM +0100, Stefan Sperling wrote:
> On Thu, Feb 04, 2016 at 03:59:09PM +0100, Henrik Friedrichsen wrote:
> > RxMCS 0xfc00>
> 
> This AP does not comply with the 11n standard I'm reading (802.11 2012)
> because it does not support all of MCS 0-7.
> 
> We currently require RxMCS starting with 0xff (MCS 0 to 7 supported).
> Looks like we need a better strategy to cope with the real world...
> 

As stsp and I have been chatting about offline, I too am having problems 
connecting
to an AP which advertises RxMCS 0xfe.

-ml



Re: uvm fault booting

2016-02-29 Thread Mike Larkin
On Mon, Feb 29, 2016 at 11:24:23AM -0500, Alan Corey wrote:
> Everything's been stable for months.  Then I was running badblocks on an SD
> card plugged into a USB card reader.  The screen went white,  I couldn't
> ssh to it, so I killed the power. It boots to just past the file system
> checks and hangs, disk access light on.  Did that before so I went away for
> an hour, came back to find the uvm fault message. 5.7 i386
> 

Upgrade to -current, as a ton of changes went into i386 pmap since 5.7.

-ml


> Sent from my Motorola XT1505



Re: dmesg: Asus 1015PX netbook (2011/2012)

2016-01-22 Thread Mike Larkin
On Fri, Jan 22, 2016 at 10:11:23AM +, Neil Hughes wrote:
> Notes at the end.
> 
> dmesg.mp
> 
> OpenBSD 5.8 (GENERIC.MP) #1236: Sun Aug 16 02:31:04 MDT 2015
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 2120744960 (2022MB)
> avail mem = 2052636672 (1957MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xf0740 (31 entries)
> bios0: vendor American Megatrends Inc. version "1301" date 05/06/2011
> bios0: ASUSTeK Computer INC. 1015PX
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP APIC MCFG ECDT OEMB HPET GSCI SSDT SLIC
> acpi0: wakeup devices P0P1(S4) P0P4(S4) P0P5(S4) P0P6(S4) P0P7(S4)
> 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) Atom(TM) CPU N570 @ 1.66GHz, 1666.76 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR
> cpu0: 512KB 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 166MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.2.0.2, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Atom(TM) CPU N570 @ 1.66GHz, 1666.48 MHz
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR
> cpu1: 512KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 1 (application processor)
> cpu2: Intel(R) Atom(TM) CPU N570 @ 1.66GHz, 1666.48 MHz
> cpu2: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR
> cpu2: 512KB 64b/line 8-way L2 cache
> cpu2: smt 1, core 0, package 0
> cpu3 at mainbus0: apid 3 (application processor)
> cpu3: Intel(R) Atom(TM) CPU N570 @ 1.66GHz, 1666.48 MHz
> cpu3: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR
> cpu3: 512KB 64b/line 8-way L2 cache
> cpu3: smt 1, core 1, package 0
> ioapic0 at mainbus0: apid 4 pa 0xfec0, version 20, 24 pins
> ioapic0: misconfigured as apic 3, remapped to apid 4
> acpimcfg0 at acpi0 addr 0xe000, bus 0-255
> acpiec0 at acpi0
> acpihpet0 at acpi0: 14318179 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 4 (P0P4)
> acpiprt2 at acpi0: bus 2 (P0P5)
> acpiprt3 at acpi0: bus -1 (P0P6)
> acpiprt4 at acpi0: bus 1 (P0P7)
> acpicpu0 at acpi0: !C3(100@57 mwait.3@0x30), !C2(500@1 mwait.1@0x10), 
> C1(1000@1 mwait.1), PSS
> acpicpu1 at acpi0: !C3(100@57 mwait.3@0x30), !C2(500@1 mwait.1@0x10), 
> C1(1000@1 mwait.1), PSS
> acpicpu2 at acpi0: !C3(100@57 mwait.3@0x30), !C2(500@1 mwait.1@0x10), 
> C1(1000@1 mwait.1), PSS
> acpicpu3 at acpi0: !C3(100@57 mwait.3@0x30), !C2(500@1 mwait.1@0x10), 
> C1(1000@1 mwait.1), PSS
> acpitz0 at acpi0: critical temperature is 101 degC
> acpibat0 at acpi0: BAT0 model "1015PE" serial   type LION oem "ASUS"
> acpiac0 at acpi0: AC unit offline
> acpiasus0 at acpi0
> acpibtn0 at acpi0: LID_
> acpibtn1 at acpi0: SLPB
> acpibtn2 at acpi0: PWRB
> cpu0: Enhanced SpeedStep 1666 MHz: speeds: 1667, 1333, 1000 MHz
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel Pineview DMI" rev 0x02
> vga1 at pci0 dev 2 function 0 "Intel Pineview Video" rev 0x02
> intagp0 at vga1
> agp0 at intagp0: aperture at 0xd000, size 0x1000
> inteldrm0 at vga1
> drm0 at inteldrm0
> inteldrm0: 1024x600
> wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
> wsdisplay0: screen 1-5 added (std, vt100 emulation)
> "Intel Pineview Video" rev 0x02 at pci0 dev 2 function 1 not configured
> azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi
> azalia0: codecs: Realtek ALC269
> audio0 at azalia0
> ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: msi
> pci1 at ppb0 bus 4
> ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: msi
> pci2 at ppb1 bus 2
> "Broadcom BCM4313" rev 0x01 at pci2 dev 0 function 0 not configured
> ppb2 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x02: msi
> pci3 at ppb2 bus 1
> alc0 at pci3 dev 0 function 0 "Attansic Technology L2C" rev 0xc1: msi, 
> address 14:da:e9:28:cc:99
> atphy0 at alc0 phy 0: F2 10/100 PHY, rev. 5
> uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 4 int 23
> uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 4 int 19
> uhci2 at pci0 dev 29 function 2 "Intel 82801GB 

Re: Open source SD card utilities?

2016-03-01 Thread Mike Larkin
On Tue, Mar 01, 2016 at 01:11:52PM -0500, Alan Corey wrote:
> They aren't hard drives, it's a whole different process.  They work
> superficially the same because that's a layer designed on.  If you go
> to sdcard.org there are technical specifications and formatters for
> Windows and Mac, like that's the whole world.
> 
> I've seen formatting with hard disk tools work, I've also had better
> luck formatting in cameras or phones.  And many times scanning for bad
>  blocks causes a hard crash of the whole computer.  I've got about 3
> USB memory sticks here about 10 years old that I don't dare to scan
> again.  But that in itself is odd, that for 10 years we haven't come
> up with a better approach.  There are hundreds of pages of PDFs on how
> they work at http://www.sdcard.org but there seem to be limitations on
> how you can use that information.  Like that .org maybe should have
> been a .com or .biz  Despicable.
> 
> But as we enter an era of solid state drives having proper utilities
> becomes more important.  And many of us experiment with rooted phones
> with Linux on SD cards, and small single board computers like the
> Raspberry Pi, Beagleboard, etc. using SD cards instead of hard drives.
> 
> You have to accept this disclaimer before you can download their PDFs:
> The information contained in the Simplified Specifications are
> presented only as a standard specification for SD cards and SD
> host/ancillary products and is provided "AS-IS" without any
> representations or warranties of any kind. No responsibility is
> assumed by the SD Group, SD-3C, LLC or the SD Card Association for any
> damages, any infringements of patents or other right of the SD Group,
> SD-3C, LLC, the SD Card Association or any third parties, which may
> result from there use or any portion there of. No license is granted
> by implication, estoppel or otherwise under any patent or other rights
> of the SD Group, SD-3C, LLC, the SD Card Association or any third
> party. Nothing herein shall be construed as an obligation by the SD
> Group, the SD-3C, LLC or the SD Card Association to disclose or
> distribute any technical information, know-how or other confidential
> information to any third party.
> 
> Ooops, I probably broke some law by posting that. :)  I was never
> interested in law school.
> 
> -- 
> Credit is the root of all evil.  - AB1JX
> 

This has nothing to do with OpenBSD. Please keep this trash off the
list.

-ml



Re: T420s 5.9/amd64 fan control?

2016-04-06 Thread Mike Larkin
On Wed, Apr 06, 2016 at 07:24:03PM +0200, Tor Houghton wrote:
> Hello,
> 
> 5.9 installed just fine, but I am wondering if there are any means of
> controlling the fan (detected as hw.sensors.acpithinkpad0.fan0) - it seems
> to be spinning at ~4000rpm, even when X isn't running and the CPU is idle.
> 
> I've apmd running, and thought perhaps "apm -A" might do the trick. Appears
> to have no effect, so .. looking at acpithinkpad.c, and though there is code
> to read the fan speed (high or low) there doesn't seem to be any
> corresponding "set fan speed" code...?
> 
> Am I out of luck?
> 
> Regards,
> 
> Tor
> 

Someone else recently reported this same issue was fixed by a bios upgrade.

I'd start there first.

-ml



Re: MAC addresses on vmd guests

2016-04-09 Thread Mike Larkin
On Fri, Apr 08, 2016 at 05:45:12PM -0500, Vijay Sankar wrote:
>   Hi,
> 
> I was trying to test patches for vmm and uvm by Stefan Kempf. Everything
> works great and copies between the host and guest are faster with the
> patches but I noticed the following.
> 
> Whenever I reboot the VMM host (running OpenBSD 5.9 -current from yesterday
> with custom kernel enabled with vmm0 at mainbus0) the guest OS (OpenBSD 5.9
> -release) has a different MAC address for the same vio0 interface.
> 
> Is this expected behavior? Reason for asking this is that if it is not
> expected behavior then probably I may be doing all this incorrectly and any
> feedback from my tests would just be a time waste for developers. So wanted
> to avoid that if possible.

Each interface in each VM receives a random MAC presently. There is provision
in the virtio spec to provide a user-defined mac, but this has not been plumbed
all the way down from vmctl (yet).

Take a look at the very end of /usr/src/usr.sbin/vmd/virtio.c for a place you
could set your MAC if you wanted. The MAC address is part of vm_create_params,
so you could, in theory plumb it down from vmctl with another option or parse
flavor if you wanted.

We have not done this yet because the interface specification command line
argument starts to look really ugly. I think reyk@ is contemplating a vm config
file definition at some point to handle these extended parameters.

Eg, we don't want something like this:

vmctl start foo -c -k /bsd -i 2,11:22:33:44:55:66,77:88:99:AA:BB:CC

... although you could probably add that to vmctl in your own local tree without
much hassle (I'm not interested in seeing that diff though as we have already 
discussed this and ruled it out).

-ml

> 
> I am running dhcpd on the host and the lease file looks as follows. I only
> have one VM guest on this test system.
> 
> builder.lab.foretell.ca$ cat /var/db/dhcpd.leases
>  ??
> lease 192.168.1.33 {
> ?? starts 5 2016/04/08 21:09:17 UTC;
> ?? ends 6 2016/04/09 09:09:17 UTC;
> ?? hardware ethernet fe:e1:ba:d0:a6:73;
> ?? uid 01:fe:e1:ba:d0:a6:73;
> }
> lease 192.168.1.32 {
> ?? starts 5 2016/04/08 21:00:45 UTC;
> ?? ends 6 2016/04/09 09:00:45 UTC;
> ?? hardware ethernet fe:e1:ba:d0:40:32;
> ?? uid 01:fe:e1:ba:d0:40:32;
> }
> lease 192.168.1.34 {
> ?? starts 5 2016/04/08 21:11:55 UTC;
> ?? ends 6 2016/04/09 09:11:55 UTC;
> ?? hardware ethernet fe:e1:ba:d0:ee:a5;
> ?? uid 01:fe:e1:ba:d0:ee:a5;
> }
> 
> lease 192.168.1.35 {
> ?? starts 5 2016/04/08 21:49:46 UTC;
> ?? ends 6 2016/04/09 09:49:46 UTC;
> ?? hardware ethernet fe:e1:ba:d0:98:23;
> ?? uid 01:fe:e1:ba:d0:98:23;
> }
> 
> DMESG from VMM HOST
> 
> OpenBSD 5.9-current (GENERIC.MP) #0: Fri Apr?? 8 13:59:37 CDT 2016
> ??
> r...@builder.lab.foretell.ca:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 16806883328 (16028MB)
> avail mem = 16293249024 (15538MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xeb410 (106 entries)
> bios0: vendor American Megatrends Inc. version "0509" date 05/09/2012
> bios0: ASUSTeK COMPUTER INC. P8H77-V LE
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S1 S3 S4 S5
> acpi0: tables DSDT FACP APIC MCFG HPET SSDT SSDT SSDT
> acpi0: wakeup devices UAR1(S4) PS2K(S4) PS2M(S4) P0P1(S4) PXSX(S4) RP01(S4)
> PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) BR10(S4)
> RP06(S4) PXSX(S4) [...]
> 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) i7-2600K CPU @ 3.40GHz, 3502.50 MHz
> cpu0:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
> cpu0: 256KB 64b/line 8-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 102MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz, 3502.00 MHz
> cpu1:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 4 (application processor)
> cpu2: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz, 3502.00 MHz
> cpu2:
> 

Re: Thinkpad T410: fan never slows down

2016-04-04 Thread Mike Larkin
On Mon, Mar 28, 2016 at 12:48:18AM +0200, St?phane Goujet wrote:
> Hello,
> 
>After several months running OpenBSD 5.7 on my Thinkpad T410, this 
> problem appeared a few days ago:
> 
> * when the systems starts, the fan is running at moderate speed, 
> everything is fine.
> * after some 10/20 minutes, it speeds up to 4500 RPM and never slows down 
> again.
> 
>There is no CPU load, but it is possible that there is a short activity 
> spike that triggers the fan acceleration.
> 
>It does not happen on Windows, and when the fan is "stuck" at high-speed 
> in OpenBSD, if I reboot into Windows 7, it will slow down after a while (a 
> few minutes, perhaps) and behave normally after that (it speeds up when 
> needed and return to moderate speed afterwards).
> 
>"Normal" speed seems to be around 3600 or 3800 RPM (I saw once 1900 RPM) 
> on OpenBSD, and "Fast" speed around 4500 RPM.
>On Windows, I saw 1900, 3600, 3800 and 4500 too. 3600 and 3800 are the 
> most common. It oscillates between them depending on the load, moves to 
> 4500 when there is alot of CPU activity and then goes down to 3800/3600 
> when this activity is over.
>1900 does not seem to be achieved often; 3600/3800 are bearable, 4500 is 
> not.
> 
>When looking for information, I saw that this fan problem has already 
> been reported, for example on this mailing-list in 2015:
> 
> 
>I do not think I changed my system a few days ago, but can I check it? 
> Is there a log of the /pkg_add/ I might have done?
> 
>The other possiblity I see is that the OpenBSD driver may take into 
> account a sensor that now returns bogus info (which would be ignored on 
> Windows). Dunno.
>I always have this "PCH" temperature at 59?C, like the other poster.

I always start by blowing the dust out of the fan vents. Yes, I know "Windows
works fine", but please start with that. Your machine is sufficiently old
that if you've never done that, it's probably time anyway.

Next:

1. build with ACPI_DEBUG on (acpivar.h) and acpi_debug set to something more
than 20.

2. Watch for acpitz messages in dmesg as your fan changes speed (or doesn't).

Note that enabling that debug level will lead to a ton of spam in dmesg, you
may instead decide to just set the dnprintfs in acpitz.c to regular printfs
(especially those in acpitz_setfan and acpitz_refresh) in order to avoid
seeing unrelated debug messages from elsewhere in ACPIland.

-ml


> 
>OK, now some info:
> 
> ===
> $ uname -mrsv
> OpenBSD 5.7 GENERIC.MP#881 amd64
> ===
> 
> Taken immediately after boot (I just noticed the itherm0 temperatures 
> were broken at that time...). We are at 3600 RPM :
> ===
> $ sysctl hw.sensors
> hw.sensors.cpu0.temp0=42.00 degC
> hw.sensors.acpitz0.temp0=47.00 degC (zone temperature)
> hw.sensors.acpibtn0.indicator0=On (lid open)
> hw.sensors.acpibat0.volt0=10.80 VDC (voltage)
> hw.sensors.acpibat0.volt1=12.09 VDC (current voltage)
> hw.sensors.acpibat0.current0=0.00 A (rate)
> hw.sensors.acpibat0.amphour0=3.04 Ah (last full capacity)
> hw.sensors.acpibat0.amphour1=0.15 Ah (warning capacity)
> hw.sensors.acpibat0.amphour2=0.02 Ah (low capacity)
> hw.sensors.acpibat0.amphour3=2.92 Ah (remaining capacity), OK
> hw.sensors.acpibat0.amphour4=4.75 Ah (design capacity)
> hw.sensors.acpibat0.raw0=0 (battery idle), OK
> hw.sensors.acpiac0.indicator0=On (power supply)
> hw.sensors.acpithinkpad0.temp0=47.00 degC
> hw.sensors.acpithinkpad0.temp1=47.00 degC
> hw.sensors.acpithinkpad0.temp2=47.00 degC
> hw.sensors.acpithinkpad0.temp3=47.00 degC
> hw.sensors.acpithinkpad0.temp4=47.00 degC
> hw.sensors.acpithinkpad0.temp5=47.00 degC
> hw.sensors.acpithinkpad0.temp6=47.00 degC
> hw.sensors.acpithinkpad0.temp7=47.00 degC
> hw.sensors.acpithinkpad0.fan0=3589 RPM
> hw.sensors.itherm0.temp4=255.00 degC (CPU/GPU Max temp)
> hw.sensors.itherm0.temp5=255.00 degC (DIMM 1)
> hw.sensors.itherm0.temp6=255.00 degC (DIMM 2)
> hw.sensors.itherm0.temp7=255.00 degC (DIMM 3)
> hw.sensors.itherm0.temp8=255.00 degC (DIMM 4)
> hw.sensors.itherm0.temp9=255.00 degC (GPU/Memory controller abs.)
> hw.sensors.itherm0.temp10=255.00 degC (PCH abs.)
> hw.sensors.itherm0.power0=0.00 W (CPU power consumption)
> hw.sensors.aps0.temp0=33.00 degC
> hw.sensors.aps0.temp1=33.00 degC
> hw.sensors.aps0.indicator0=Off (Keyboard Active)
> hw.sensors.aps0.indicator1=Off (Mouse Active)
> hw.sensors.aps0.indicator2=On (Lid Open)
> hw.sensors.aps0.raw0=408 (X_ACCEL)
> hw.sensors.aps0.raw1=517 (Y_ACCEL)
> hw.sensors.aps0.raw2=408 (X_VAR)
> hw.sensors.aps0.raw3=517 (Y_VAR)
> ===
> 
> After a few minutes, we jump to 3800 RPM (and we never go back to 3600):
> ===
> hw.sensors.cpu0.temp0=36.00 degC
> hw.sensors.acpitz0.temp0=46.00 degC (zone temperature)
> hw.sensors.acpibtn0.indicator0=On (lid open)
> hw.sensors.acpibat0.volt0=10.80 VDC 

Re: Unable to boot on APU2C4

2016-04-21 Thread Mike Larkin
On Thu, Apr 21, 2016 at 09:05:17PM +0200, Christer Solskogen wrote:
> Hi!
> 
> I've gotten my finger on a APU2C4, but I'm not able to install nor
> even start OpenBSD on it. I've tried both USB and iPXE and all I ever
> get is this:
> 
> Booting from Hard Disk...
> Booting from :7c00
> Using drive 0, partition 3.
> Loading.
> probing: pc0 com0 com1 mem[638K 3582M 496M a20=on]
> disk: hd0+
> >> OpenBSD/amd64 BOOT 3.30
> boot>
> cannot open hd0a:/etc/random.seed: No such file or directory
> booting hd0a:/bsd: 3339844+1409808+2413568+0+585728=0x766238
> entry point at 0x1001000 [7205c766, 3404, 24448b12, 8680a304]
> 
> Then it stops for a couple of seconds before it reboots like this:
> PCEngines apu2
> coreboot build 20160311
> ...
> 
> I do not have a mSATA drive in it, yet. But that should not have
> anything to do with it, should it?
> 
> -- 
> chs
> 

You're booting /bsd. Were you able to do an install before this using /bsd.rd?

In other words, how did you get to this point?

And if you were able to boot /bsd.rd, please provide a dmesg.

-ml



Re: FW: Re: watchdog suport for new hardware

2016-04-28 Thread Mike Larkin
On Thu, Apr 28, 2016 at 03:22:15PM +, Stuart Henderson wrote:
> On 2016-04-28, stan  wrote:
> > On Thu, Apr 28, 2016 at 02:18:25PM +0100, Stuart Henderson wrote:
> >> On 2016/04/28 08:56, stan wrote:
> >> > On Thu, Apr 28, 2016 at 08:44:49AM +0100, Stuart Henderson wrote:
> >> > > Stan, can you send the information that is output when you run
> >> > > sendbug -P as root? Just putting the whole thing inline in a
> >> > > reply-to-all to this mail would be fine. Please add "sysctl hw"
> >> > > output as well. Ideally we want a way to identify the watchdog
> >> > > itself rather than the general machine type etc. which is why
> >> > > I'm hoping they follow Microsoft's spec (which is the de-facto 
> >> > > standard for this).
> >> > 
> >> > 
> >> > Sorry got distracted and frgot to cc the list.
> >> 
> >> OK, pity, there doesn't seem to be anything to properly identify
> >> the watchdog in acpi tables. Just the vendor-specific thing which
> >> needs reading to figure things out further. If they had followed
> >> the usual spec then the driver would have been *very* generally
> >> useful.
> >> 
> >> In that case maybe the approach would be to do something similar
> >> to acpithinkpad, but matching SECD instead of MHKV, and then
> >> looking for the SEL0002 HID. But I only know a bit about how
> >> to find my way round the decompiled files, so ignore me if
> >> a real ACPI hacker steps in with a better idea ;)
> >> 
> >> > hw.vendor=Schweitzer Engineering Laboratories, Inc.
> >> > hw.product=SEL-3355
> >> 
> >> An alternative might be to match on vendor/product, see the last
> >> commit to sys/dev/ic/re.c for how to do this, but then you're
> >> having to look at fixed addresses which they seem to be providing
> >> via acpi.
> >> 
> >
> > Let me apologize right here for my lack of knowledge as to low level
> > hardware coding.
> >
> > So, given that, please help me to understand why reading the DSDT ACPI
> > table and finding the SEL0002 is not the correct solution here?  BTW, they
> > also identify an SEL0001 device, but I have not asked them what that is,
> > and )so far) I do not need to know. For what it is worth this hardware
> > vendor has been very helpful, and the corporate philosophy is to do things
> > "the right way". For instance, they released code to support this device for
> > Linux. When I talked to them, i brought up liscneing concerns with the
> > BSD's. The reply was, already been there, thought about that. It is dual
> > GPL, and BSD liscneced. Really a pleasant sunrise, as this is not in their
> > mainstream area of expertise. i was really pleased that the project team
> > had researched the OSS issues that well.
> 
> I was just chatting to mlarkin about this, he hasn't looked at the
> code but gave a few suggestions. 
> 
> I was wrong about the need to look for the SECD container - he gave an
> example of a better driver to crib from, sdhc_acpi, which is pretty
> simple in itself and shows the parts needed to find the device in the
> DSDT. Basically it just involves passing an array containing "SEL0002"
> to acpi_matchhids and it does the work.
> 

It does the work for the find and attach. After that, you'll need to plumb
the AML to find the device location and IRQ/etc. But sdhc_acpi is a simple
driver that has most of the system interface goo you need to get started.

-ml



Re: Is loss of read-only /usr permanent?

2016-05-17 Thread Mike Larkin
On Tue, May 17, 2016 at 07:45:55PM +0100, Kevin Chadwick wrote:
> > > UPS do fail too btw. I had to rip some cheap APC ones out because
> > > they caused more downtime than they saved!  
> > 
> > Did you just copy paste this line from somewhere?  You can't handle a
> > battery replacement, and you're advising read only file system mounts.
> 
> I sometimes agree with some things you say but boy are you way too hot
> headed.
> 
> You assume a lot and I expect it has got you in trouble before. If not
> then I expect it will if you actually speak to anyone in person like
> that.
> 
> You assume:
> 
> I'm not a founder of an electronics design and engineering company
> 
> My fathers company wasn't the first in the world AFAIK to sell a rugged
> DC vehicle UPS
> 
> I didn't transfer 8 batteries from ex rental stock and wire them
> together into a working AC UPS (to save money).
> 
> Those other APC UPS that failed didn't have brand new batteries and were
> just craply designed electronics that would switch off during a
> battery removal.
> 
> My cousin had clients that were annoyed because an expensive UPS failed
> due to a huge surge, who knows, perhaps lightning and they thought
> paying over a thousand pounds should keep them running no matter what
> happened.
> 
> I'm not a troll that has been on this list for far longer than when
> your quite fitting email address domain first appeared.
> 
> 
> p.s. My DATA is quite safe. I assure you.
> 
> -- 
> 
> KISSIS - Keep It Simple So It's Securable
> 

take this offline please. nobody cares anymore.



Re: FW: Re: watchdog suport for new hardware

2016-05-03 Thread Mike Larkin
On Tue, May 03, 2016 at 03:32:34PM -0500, Chase Davis wrote:
> Mike,
> 
> We took your suggestion and re-wrote the driver to model sdhc_acpi. I
> have attached the new code. However, the match function never returns
> a 1. We put temporary print statements in the match routine. It is
> being called several times during the kernel boot process, but it
> never finds a device with HID SEL0002. Do you have any suggestions for
> why it would show up in the DSDT tables when we do an acpidump, but
> that the match routine never finds it?
> 
> This is a snippet from the dmesg boot log
> 
> Attempting to match SEL: result (0)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> Attempting to match SEL: result (0)
> Attempting to match SEL: result (0)
> Attempting to match SEL: result (0)
> Attempting to match SEL: result (0)
> acpihpet0 at acpi0: 14318179 Hz
> Attempting to match SEL: result (0)
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> 
> int
> sel_acpi_match(struct device *parent, void *match, void *aux)
> {
> struct acpi_attach_args *aaa = aux;
> struct cfdata *cf = match;
> printf("Attempting to match SEL: ");
> int res = acpi_matchhids(aaa, sel_hids, cf->cf_driver->cd_name);
> printf("result (%d)\n", res);
> return res;
> }
> 
> Thanks,
> Chase

I think this diff is missing some parts. Like GENERIC?

Also, you need a NULL after your last HID or matchhids will walk all
through memory until it hits a NULL.

-ml

> /*$OpenBSD: sel.c,v 1.0 2016/04/01 05:00:00 jsg Exp $ */
> /*
>  * Copyright (c) 2016 PREMIER System Integrators
>  *
>  * Permission to use, copy, modify, and distribute this software for any
>  * purpose with or without fee is hereby granted, provided that the above
>  * copyright notice and this permission notice appear in all copies.
>  *
>  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
>  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
>  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
>  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
>  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
>  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
>  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
>  *
>  * Schweitzer Engineering Laboratories: SEL-3355 Embedded controller
> */
> 
> #include 
> #include 
> #include 
> #include 
> #include 
> #include 
> 
> #include 
> 
> #include 
> #include 
> #include 
> #include 
> #include 
> 
> #include 
> 
> struct sel_host;
> 
> struct sel_softc {
>   /* sc_dev must be the first item in the struct */
>   struct device   sc_dev;
>   struct sel_host **sc_host;
> };
> 
> struct sel_acpi_softc {
>   struct sel_softcsc;
>   struct acpi_softc   *sc_acpi;
>   struct aml_node *sc_node;
> 
>   /* device access through bus space */
>   bus_space_tag_t sc_iot;
>   bus_space_handle_t  sc_ioh;
>   bus_addr_t  sc_addr;
>   bus_size_t  sc_size;
> 
>   struct sel_host *sc_host;
> };
> 
> int sel_wait(bus_space_tag_t, bus_space_handle_t, bool);
> 
> /* Autoconfiguration glue */
> int sel_acpi_match(struct device *, void *, void *);
> void sel_acpi_attach(struct device *, struct device *, void *);
> int sel_print(void *, const char *);
> int sel_wd_cb(void *, int);
> 
> /* functions to interact with the controller */
> void sel_write_wdog(bus_space_tag_t, bus_space_handle_t, int);
> u_int8_t sel_read_wdog(bus_space_tag_t, bus_space_handle_t);
> u_int8_t sel_read_status(bus_space_tag_t, bus_space_handle_t);
> void sel_abort(bus_space_tag_t, bus_space_handle_t);
> u_int32_t sel_read_boardid(bus_space_tag_t, bus_space_handle_t);
> u_int32_t sel_read_mcversion(bus_space_tag_t, bus_space_handle_t);
> u_int16_t sel_read_pciboardid(bus_space_tag_t, bus_space_handle_t);
> u_int8_t sel_read_ledctl0(bus_space_tag_t, bus_space_handle_t);
> void sel_write_ledctl0(bus_space_tag_t, bus_space_handle_t, u_int8_t);
> u_int8_t sel_read_ledctl1(bus_space_tag_t, bus_space_handle_t);
> void sel_write_ledctl1(bus_space_tag_t, bus_space_handle_t, u_int8_t);
> u_int8_t sel_read_miscctl0(bus_space_tag_t, bus_space_handle_t);
> u_int8_t sel_read_miscctl1(bus_space_tag_t, bus_space_handle_t);
> void sel_read_modelno(bus_space_tag_t, bus_space_handle_t, char*);
> void sel_read_serialno(bus_space_tag_t, bus_space_handle_t, char*);
> void sel_read_configid(bus_space_tag_t, bus_space_handle_t, char*);
> 
> /* macros to extract bits from the status register */
> #define EC_STATUS_IBF(status) (((status) >> 0x1) & 0x1)
> #define EC_STATUS_OBF(status) (((status) & 0x1))
> #define EC_STATUS_BUSY(status)(((status) >> 0x4) & 0x1)
> #define EC_STATUS_STATE(status)   (((status) >> 0x6) & 0x3)
> 
> struct cfattach sel_acpi_ca = {
>   sizeof(struct sel_acpi_softc), sel_acpi_match, sel_acpi_attach
> };
> 
> struct 

Re: Laptop not waking from suspend on opening lid

2016-05-02 Thread Mike Larkin
On Sun, May 01, 2016 at 04:08:28PM +0100, Anthony Campbell wrote:
> This is on a Thinkpad Z61m running amd64. Suspend on lid closure has
> worked without problems for many months with numerous snapshots. After
> upgrading on 30 April the machine no longer wakes on lid opening. The
> sleep symbol below the screen blinks repeatedly but nothing else
> happens.
> 
> If I suspend it with Fn+F4 the same thing happens; it is impossible to
> wake the machine.
> 
> Another Thinkpad running i386 is not affected.
> 

When did it last work? Eg, when before "30 April"?

-ml

> 
> My dmesg:
> 
> 
> 
> OpenBSD 5.9-current (GENERIC.MP) #2001: Sat Apr 30 17:20:25 MDT 2016
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 3203203072 (3054MB)
> avail mem = 3101589504 (2957MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (68 entries)
> bios0: vendor LENOVO version "7FET91WW (2.09 )" date 11/01/2006
> bios0: LENOVO 9450HAG
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET SLIC BOOT SSDT SSDT 
> SSDT SSDT
> acpi0: wakeup devices LID_(S3) SLPB(S3) UART(S3) EXP0(S4) EXP1(S4) EXP2(S4) 
> EXP3(S4) PCI1(S4) USB0(S3) USB1(S3) USB3(S3) USB7(S3) HDEF(S4)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpiec0 at acpi0
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 1995.32 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
> cpu0: 4MB 64b/line 16-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 166MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 1995.00 MHz
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
> cpu1: 4MB 64b/line 16-way L2 cache
> cpu1: smt 0, core 1, package 0
> ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
> ioapic0: misconfigured as apic 2, remapped to apid 1
> acpimcfg0 at acpi0 addr 0xf000, bus 0-63
> acpihpet0 at acpi0: 14318179 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 1 (AGP_)
> acpiprt2 at acpi0: bus 2 (EXP0)
> acpiprt3 at acpi0: bus 3 (EXP1)
> acpiprt4 at acpi0: bus 4 (EXP2)
> acpiprt5 at acpi0: bus 12 (EXP3)
> acpiprt6 at acpi0: bus 21 (PCI1)
> acpicpu0 at acpi0: !C3(250@17 mwait.3@0x20), !C2(500@1 mwait.1@0x10), 
> C1(1000@1 mwait.1), PSS
> acpicpu1 at acpi0: !C3(250@17 mwait.3@0x20), !C2(500@1 mwait.1@0x10), 
> C1(1000@1 mwait.1), PSS
> acpipwrres0 at acpi0: PUBS, resource for USB0, USB7
> acpitz0 at acpi0: critical temperature is 127 degC
> acpitz1 at acpi0: critical temperature is 99 degC
> acpibtn0 at acpi0: LID_
> acpibtn1 at acpi0: SLPB
> "PNP0303" at acpi0 not configured
> "IBM0057" at acpi0 not configured
> "IBM0071" at acpi0 not configured
> "ATM1200" at acpi0 not configured
> acpibat0 at acpi0: BAT0 model "92P1127" serial 14319 type LION oem "SANYO"
> acpiac0 at acpi0: AC unit online
> acpithinkpad0 at acpi0
> acpidock0 at acpi0: GDCK not docked (0)
> acpivideo0 at acpi0: VID_
> acpivout0 at acpivideo0: LCD0
> acpivideo1 at acpi0: VID_
> acpivout at acpivideo1 not configured
> cpu0: Enhanced SpeedStep 1995 MHz: speeds: 2000, 1667, 1333, 1000 MHz
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
> ppb0 at pci0 dev 1 function 0 "Intel 82945GM PCIE" rev 0x03: msi
> pci1 at ppb0 bus 1
> radeondrm0 at pci1 dev 0 function 0 "ATI Radeon Mobility X1400" rev 0x00
> drm0 at radeondrm0
> radeondrm0: apic 1 int 16
> azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi
> azalia0: codecs: Analog Devices AD1981HD, Conexant/0x2bfa, using Analog 
> Devices AD1981HD
> audio0 at azalia0
> ppb1 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: msi
> pci2 at ppb1 bus 2
> bge0 at pci2 dev 0 function 0 "Broadcom BCM5752M" rev 0x02, BCM5752 A2 
> (0x6002): msi, address 00:16:36:ca:5d:9c
> brgphy0 at bge0 phy 1: BCM5752 10/100/1000baseT PHY, rev. 0
> ppb2 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: msi
> pci3 at ppb2 bus 3
> wpi0 at pci3 dev 0 function 0 "Intel PRO/Wireless 3945ABG" rev 0x02: msi, 
> MoW2, address 00:19:d2:0b:08:78
> ppb3 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x02: msi
> pci4 at ppb3 bus 4
> ppb4 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x02: msi
> pci5 at ppb4 bus 12
> uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 1 int 16
> uhci1 at pci0 dev 29 function 1 "Intel 

Re: Laptop not waking from suspend on opening lid

2016-05-04 Thread Mike Larkin
On Wed, May 04, 2016 at 11:06:37PM +0200, Norman Golisz wrote:
> I just checked it and I can reproduce it on my T400 (dmesg below).
> 
> On Tue May  3 2016 08:28, Anthony Campbell wrote:
> > On 03 May 2016, Anthony Campbell wrote:
> > > On 02 May 2016, Mike Larkin wrote:
> > > > On Sun, May 01, 2016 at 04:08:28PM +0100, Anthony Campbell wrote:
> > > > > This is on a Thinkpad Z61m running amd64. Suspend on lid closure has
> > > > > worked without problems for many months with numerous snapshots. After
> > > > > upgrading on 30 April the machine no longer wakes on lid opening. The
> > > > > sleep symbol below the screen blinks repeatedly but nothing else
> > > > > happens.
> > > > > 
> > > > > If I suspend it with Fn+F4 the same thing happens; it is impossible to
> > > > > wake the machine.
> > > > > 
> > > > > Another Thinkpad running i386 is not affected.
> > > > > 
> > > > 
> > > > When did it last work? Eg, when before "30 April"?
> 
> Unfortunately, I didn't upgrade frequently - I made a jump from Apr 7.
> to Apr 29., but the kernel from Apr 7. works.
> 
> I'll try to bisect.
> 

This is probably the same problem that kettenis fixed in a recent post.

I'd try applying that diff first.

-ml



Re: Fluxbox doesn't survive to a suspend to disk when restarted

2016-08-11 Thread Mike Larkin
On Thu, Aug 11, 2016 at 03:10:25PM +0200, Alessandro DE LAURENZIS wrote:
> Hello,
> 
> I'm reporting this without any details because actually I do not know how to
> start a debugging...
> 
> After resuming from an hibernation, restarting Fluxbox (Restart from menu or
> issuing "fluxbox-remote -Restart") systematically crashes it, causing the
> XDM login window to appear. No core generated, nothing annotated into system
> logs / Fluxbox's log.
> 
> This is on -current, Aug 10 (same behaviour with other recent, don't know
> the situation for previous ones).
> 
> Anybody noticed the same?
> 
> All the best
> 
> -- 
> Alessandro DE LAURENZIS
> [mailto:jus...@atlantide.t28.net]
> LinkedIn: http://it.linkedin.com/in/delaurenzis
> 

dmesg and pkg_info -t please.



Re: Fluxbox doesn't survive to a suspend to disk when restarted

2016-08-11 Thread Mike Larkin
On Thu, Aug 11, 2016 at 09:39:33PM +0200, Alessandro DE LAURENZIS wrote:
> dmesg and pkg_info -t as requested:
> 

I installed fluxbox and tried to repro this. It works fine here.

Does this fail just after many ZZZs? because it looks from your dmesg that
you did a bunch of them. Does it fail after the first one?

-ml

> 
> OpenBSD 6.0-current (GENERIC.MP) #2345: Tue Aug  9 23:00:50 MDT 2016
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 3177906176 (3030MB)
> avail mem = 3077181440 (2934MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (73 entries)
> bios0: vendor LENOVO version "7LETD0WW (2.30 )" date 02/27/2012
> bios0: LENOVO 7735WX2
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET BOOT ASF! SSDT SSDT
> SSDT SSDT
> acpi0: wakeup devices LID_(S3) SLPB(S3) LURT(S3) DURT(S3) IGBE(S4) EXP0(S4)
> EXP1(S4) EXP2(S4) EXP3(S4) EXP4(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3)
> USB3(S3) USB4(S3) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpiec0 at acpi0
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM)2 Duo CPU T8100 @ 2.10GHz, 2294.66 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,NXE,LONG,LAHF,PERF,SENSOR
> cpu0: 3MB 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 199MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2.1.3, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Core(TM)2 Duo CPU T8100 @ 2.10GHz, 2094.75 MHz
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,NXE,LONG,LAHF,PERF,SENSOR
> cpu1: 3MB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
> acpimcfg0 at acpi0 addr 0xf000, bus 0-63
> acpihpet0 at acpi0: 14318179 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus -1 (AGP_)
> acpiprt2 at acpi0: bus 2 (EXP0)
> acpiprt3 at acpi0: bus 3 (EXP1)
> acpiprt4 at acpi0: bus 4 (EXP2)
> acpiprt5 at acpi0: bus 5 (EXP3)
> acpiprt6 at acpi0: bus 13 (EXP4)
> acpiprt7 at acpi0: bus 21 (PCI1)
> acpicpu0 at acpi0: !C3(250@17 mwait.3@0x20), !C2(500@1 mwait.1@0x10),
> C1(1000@1 mwait.1), PSS
> acpicpu1 at acpi0: !C3(250@17 mwait.3@0x20), !C2(500@1 mwait.1@0x10),
> C1(1000@1 mwait.1), PSS
> acpipwrres0 at acpi0: PUBS, resource for USB0, USB2, USB4, EHC0, EHC1
> acpitz0 at acpi0: critical temperature is 127 degC
> acpitz1 at acpi0: critical temperature is 100 degC
> acpibtn0 at acpi0: LID_
> acpibtn1 at acpi0: SLPB
> "PNP0303" at acpi0 not configured
> "IBM0057" at acpi0 not configured
> tpm0 at acpi0: TPM_ addr 0xfed4/0x5000: device 0x32031114 rev 0x9
> acpibat0 at acpi0: BAT0 model "42T5264" serial  1732 type LION oem
> "Panasonic"
> acpiac0 at acpi0: AC unit online
> acpithinkpad0 at acpi0
> "PNP0C14" at acpi0 not configured
> acpidock0 at acpi0: GDCK not docked (0)
> acpivideo0 at acpi0: VID_
> acpivout0 at acpivideo0: LCD0
> acpivideo1 at acpi0: VID_
> cpu0: Enhanced SpeedStep 2294 MHz: speeds: 2101, 2100, 1600, 1200, 800 MHz
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel GM965 Host" rev 0x0c
> inteldrm0 at pci0 dev 2 function 0 "Intel GM965 Video" rev 0x0c
> drm0 at inteldrm0
> intagp0 at inteldrm0
> agp0 at intagp0: aperture at 0xe000, size 0x1000
> inteldrm0: msi
> inteldrm0: 1280x800
> wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
> wsdisplay0: screen 1-5 added (std, vt100 emulation)
> "Intel GM965 Video" rev 0x0c at pci0 dev 2 function 1 not configured
> em0 at pci0 dev 25 function 0 "Intel ICH8 IGP M AMT" rev 0x03: msi, address
> 00:21:86:94:34:8e
> uhci0 at pci0 dev 26 function 0 "Intel 82801H USB" rev 0x03: apic 1 int 20
> uhci1 at pci0 dev 26 function 1 "Intel 82801H USB" rev 0x03: apic 1 int 21
> ehci0 at pci0 dev 26 function 7 "Intel 82801H USB" rev 0x03: apic 1 int 22
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
> azalia0 at pci0 dev 27 function 0 "Intel 82801H HD Audio" rev 0x03: msi
> azalia0: codecs: Analog Devices AD1984, Conexant/0x2bfa, using Analog
> Devices AD1984
> audio0 at azalia0
> ppb0 at pci0 dev 28 function 0 "Intel 82801H PCIE" rev 0x03: msi
> pci1 at ppb0 bus 2
> ppb1 at pci0 dev 28 function 1 "Intel 82801H PCIE" rev 0x03: msi
> pci2 at ppb1 bus 3
> iwn0 at pci2 dev 0 function 0 "Intel Wireless WiFi Link 4965" rev 0x61: msi,
> MIMO 2T3R, MoW2, address 00:21:5c:75:a7:1d
> ppb2 at pci0 dev 28 function 2 "Intel 82801H PCIE" rev 0x03: msi
> pci3 

Re: Dell Latitude E5570 on current/amd64

2016-08-09 Thread Mike Larkin
On Tue, Aug 09, 2016 at 07:43:38PM +0200, Jan Stary wrote:
> This is Dell Latitude E5570 running current (full dmesg below).
> Basically works, but I experience problems with resuming the video.
> 

You have Skylake video which does not resume properly yet.

-ml

> This is what /var/log/messages has to say about the suspend/resume.
> 
>   Aug  9 19:05:18 dell apmd: system suspending
>   Aug  9 19:05:19 dell /bsd: ugen0 detached
>   Aug  9 19:05:20 dell /bsd: ugen1 detached
>   Aug  9 19:05:21 dell /bsd: video0 detached
>   Aug  9 19:05:21 dell /bsd: uvideo0 detached
>   Aug  9 19:05:22 dell /bsd: uhub0 detached
>   Aug  9 19:05:45 dell /bsd: uhub0 at usb0 "Intel xHCI root hub" rev 
> 3.00/1.00 addr 1
>   Aug  9 19:05:45 dell apmd: system resumed from sleep
>   Aug  9 19:05:45 dell /bsd: ugen0 at uhub0 port 6 "Intel product 0x0a2b" rev 
> 2.00/0.01 addr 2
>   Aug  9 19:05:46 dell /bsd: usbd_fill_iface_data: bad max packet size
>   Aug  9 19:05:46 dell last message repeated 7 times
>   Aug  9 19:05:46 dell /bsd: ugen1 at uhub0 port 10 "Broadcom Corp 5880" rev 
> 1.10/1.01 addr 3
>   Aug  9 19:05:46 dell /bsd: usbd_fill_iface_data: bad max packet size
>   Aug  9 19:05:46 dell last message repeated 7 times
>   Aug  9 19:05:47 dell /bsd: uvideo0 at uhub0 port 11 configuration 1 
> interface 0 "CN0J8NNP7248765RBBM6A00 Integrated_Webcam_HD" rev 2.00/54.13 
> addr 4
>   Aug  9 19:05:47 dell /bsd: video0 at uvideo0
> 
> The apmd is running as 'apmd -A'.
> The suspend was initiated by 'zzz' (and seems to go fine);
> the resume was initiated by pressing the blinking power button.
> It does not resume fully: the screen stays black. The detached
> usb devices re-attach, the machine is pingable, but I cannot
> connect with ssh.
> 
> Maybe related: there is no vga0, but there is vga1.
> 
>   vga1 at pci0 dev 2 function 0 "Intel HD Graphics 530" rev 0x06
>   wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
>   wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> 
> Maybe also related: on intel graphics, mplayer usually has no problem
> going fullscreen; here, fullscren just means the original size centered
> on an otherwise empty screen. 'xvinfo' says 'no adaptors present'.
> Is that expected?
> 
> Also, there is quite a few devices "not configured".
> See below for pcidump -xxvv.
> 
> How can I help further debug this machine?
> 
>   Thank you
> 
>   Jan
> 
> 
> 
> OpenBSD 6.0-current (GENERIC.MP) #1: Mon Aug  8 19:55:50 CEST 2016
> r...@dell.stare.cz:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 16810340352 (16031MB)
> avail mem = 16296390656 (15541MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xeac10 (107 entries)
> bios0: vendor Dell Inc. version "1.5.0" date 04/22/2016
> bios0: Dell Inc. Latitude E5570
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP APIC FPDT FIDT MCFG HPET SSDT LPIT SSDT SSDT SSDT 
> DBGP DBG2 SSDT UEFI SSDT SSDT SLIC DMAR ASF!
> acpi0: wakeup devices PEGP(S4) PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) PEG2(S4) 
> UAR1(S3) PXSX(S4) RP09(S4) PXSX(S4) RP10(S4) PXSX(S4) RP11(S4) PXSX(S4) 
> RP12(S4) PXSX(S4) [...]
> 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-6440HQ CPU @ 2.60GHz, 2295.51 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
> cpu0: 256KB 64b/line 8-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 23MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Core(TM) i5-6440HQ CPU @ 2.60GHz, 2294.63 MHz
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 4 (application processor)
> cpu2: Intel(R) Core(TM) i5-6440HQ CPU @ 2.60GHz, 2294.63 MHz
> cpu2: 
> 

Re: Fluxbox doesn't survive to a suspend to disk when restarted

2016-08-14 Thread Mike Larkin
On Sun, Aug 14, 2016 at 06:16:11PM +0200, Alessandro DE LAURENZIS wrote:
> Mike,
> 
> On Fri, 12 Aug 2016 19:47:40 +0200
> Alessandro DE LAURENZIS <jus...@atlantide.t28.net> wrote:
> 
> > Hi Mike,
> > 
> > On 2016-08-12 18:54, Mike Larkin wrote:
> > > Shrug. Works fine here on i386 and amd64.
> > > 
> > > Do other processes crash as well? What if you leave fluxbox
> > > running? Does
> > > it eventually fail on its own without needing fluxbox-remote to
> > > trigger it?  
> > 
> > As far as I can say, no other crash, neither fluxbox nor other
> > processes (I'm currently running this session since several hours 
> > without any
> > issues).
> > 
> > Only the restart seems to trigger the misbehaviour.
> 
> Playing with gdb:
> 
> [snip]
> GNU gdb 6.3
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "amd64-unknown-openbsd6.0"...(no debugging symbols 
> found)
> 
> (gdb) run
> Starting program: /usr/local/bin/fluxbox 
> (no debugging symbols found)
> 
> Program received signal SIGTRAP, Trace/breakpoint trap.
> Cannot remove breakpoints because program is no longer writable.
> It might be running in another process.
> Further execution is probably impossible.
> 0x173fb63002b0 in ?? ()
> (gdb) quit
> The program is running.  Exit anyway? (y or n) 
> [snip]
> 
> Does it suggest anything useful?
> 

No.

> -- 
> Alessandro DE LAURENZIS
> [mailto:jus...@atlantide.t28.net]
> LinkedIn: http://it.linkedin.com/in/delaurenzis



Re: Fluxbox doesn't survive to a suspend to disk when restarted

2016-08-12 Thread Mike Larkin
On Fri, Aug 12, 2016 at 11:23:45AM +0200, Alessandro De Laurenzis wrote:
> Hi Mike,
> 
> (sorry, I'm having issues with my e-mail service...)
> 
> >I installed fluxbox and tried to repro this. It works fine here.
> >
> >Does this fail just after many ZZZs? because it looks from your dmesg that
> >you did a bunch of them. Does it fail after the first one?
> >
> >-ml
> 
> the crash is triggered after the first ZZZ, too.
> 
> -- 
> Alessandro De Laurenzis
> [mailto:sandro.delauren...@gmail.com]

Shrug. Works fine here on i386 and amd64.

Do other processes crash as well? What if you leave fluxbox running? Does
it eventually fail on its own without needing fluxbox-remote to trigger
it?

-ml



Re: Sleep, Thinkpad x250

2016-07-12 Thread Mike Larkin
On Tue, Jul 12, 2016 at 02:50:33PM -0400, Donald Allen wrote:
> I have a Thinkpad x250 running 5.9 stable, up-to-date. This system
> will not re-awaken from sleep mode. No response to the power button --
> it just continues to sit there slowly blinking and does not respond to
> pings. Power cycling is the only way I've found to recover. dmesg
> below. I believe this is one of the Broadwell cpus Ted Unangst
> mentions in his blog post on OpenBSD and laptops.
> 

Starting with the x240, you need to disable the TPM in the BIOS for
resume to work. This applies to other models in the same line as well 
(eg, t440, t450, etc).

Try that and see if it fixes things.

-ml

> OpenBSD 5.9-stable (GENERIC.MP) #0: Tue Jul  5 21:42:13 EDT 2016
> d...@igor.allen.net:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 3959959552 (3776MB)
> avail mem = 3835744256 (3658MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xccbfd000 (65 entries)
> bios0: vendor LENOVO version "N10ET38W (1.17 )" date 08/20/2015
> bios0: LENOVO 20CMCTO1WW
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP ASF! HPET ECDT APIC MCFG SSDT SSDT SSDT SSDT
> SSDT SSDT SSDT SSDT SSDT PCCT SSDT TCPA SSDT UEFI MSDM BATB FPDT UEFI
> acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 14318179 Hz
> acpiec0 at acpi0
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i3-5010U CPU @ 2.10GHz, 1995.70 MHz
> cpu0:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
> H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
> ,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEA
> DLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FS
> GSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT
> cpu0: 256KB 64b/line 8-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Core(TM) i3-5010U CPU @ 2.10GHz, 1995.39 MHz
> cpu1:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
> H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
> ,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEA
> DLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FS
> GSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 1, core 0, package 0
> cpu2 at mainbus0: apid 2 (application processor)
> cpu2: Intel(R) Core(TM) i3-5010U CPU @ 2.10GHz, 1995.39 MHz
> cpu2:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
> H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
> ,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEA
> DLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FS
> GSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT
> cpu2: 256KB 64b/line 8-way L2 cache
> cpu2: smt 0, core 1, package 0
> cpu3 at mainbus0: apid 3 (application processor)
> cpu3: Intel(R) Core(TM) i3-5010U CPU @ 2.10GHz, 1995.39 MHz
> cpu3:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
> H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
> ,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEA
> DLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FS
> GSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT
> cpu3: 256KB 64b/line 8-way L2 cache
> cpu3: smt 1, core 1, package 0
> ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins
> acpimcfg0 at acpi0 addr 0xf800, bus 0-63
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus -1 (PEG_)
> acpiprt2 at acpi0: bus 2 (EXP1)
> acpiprt3 at acpi0: bus 3 (EXP2)
> acpiprt4 at acpi0: bus -1 (EXP3)
> acpicpu0 at acpi0: C3(200@233 mwait.1@0x40), C2(200@148 mwait.1@0x33),
> C1(1000@1 mwait.1), PSS
> acpicpu1 at acpi0: C3(200@233 mwait.1@0x40), C2(200@148 mwait.1@0x33),
> C1(1000@1 mwait.1), PSS
> acpicpu2 at acpi0: C3(200@233 mwait.1@0x40), C2(200@148 mwait.1@0x33),
> C1(1000@1 mwait.1), PSS
> acpicpu3 at acpi0: C3(200@233 mwait.1@0x40), C2(200@148 mwait.1@0x33),
> C1(1000@1 mwait.1), PSS
> acpipwrres0 at acpi0: PUBS, resource for XHCI, EHC1
> acpipwrres1 at acpi0: NVP3, resource for PEG_
> acpipwrres2 at acpi0: NVP2, resource for PEG_
> acpitz0 at acpi0: critical temperature is 128 degC
> acpibtn0 at acpi0: LID_
> acpibtn1 at acpi0: SLPB
> acpibat0 at acpi0: BAT0 model 

Re: Fifteen questions

2016-06-27 Thread Mike Larkin
On Sun, Jun 26, 2016 at 08:42:30AM +0200, Joerg Jung wrote:
> > d. Just to be sure: hibernate/ZZZ can be used over a softraid-crypto disk,
> huh?
> 
> Never tried myself, but I expect it to work.

ZZZ on softraid crypto should work, provided the underlying device also
supports ZZZ. This presently means sd(4) on ahci(4) and wd(4) on pciide(4)
(and possibly wdc(4) but I don't think you have that).

If you have one of those combinations, it should work. If it doesn't, I'd
like to know.

-ml



Re: [Q] Thinkpad x230, softraid crypto and ZZZ

2016-07-03 Thread Mike Larkin
On Sun, Jul 03, 2016 at 01:40:39PM -0400, Bryan Everly wrote:
> Hi,
> 
> I have suspend to RAM working just fine on this system but when I try to 
> suspend to disk (ZZZ) it just hangs the system (I thought it might just 
> be slow so I let it run for 2 hours and it never completed).  Some data 
> points:
> 
> 1.  I encrypt my boot drive (sd0) with softraid
> 
> 2.  My /etc/fstab points to a swap partition outside of the softraid 
> volume and is 2x my RAM size
> 

from your dmesg below:
> root on sd2a (71b4bf84dbfc9f74.a) swap on sd2b dump on sd2b

That's where we take the swap location from. And that's your sr crypto
device according to the dmesg. Is this large enough?

Try putting swap inside the sr crypto volume and it should be fine.
Don't try to use some strange mix of half-crypto and half-not. (why
someone would go to the effort of encrypting everything *except* swap
leaves me scratching my head).

Note - you have just about the exact same machine as I do, where
ZZZ was developed. I also have sr crypto in use and 16GB. As a matter of
fact, the x230 in configs like yours probably received the most testing
of any machine out there as that's what most developers had during the
timeframe ZZZ was being shaken out.

Generally, when ZZZing, an x230 with 16GB writes out about 600-800MB
when doing general purpose stuff like browsing, compiling, etc. Strictly for
ZZZ, you don't need 2X RAM size. Just 1X RAM size is "enough" as if we can't fit
the hibernated image into a size 1X the size of your RAM, you're hooped
anyway. This will still take a few minutes as the I/O routines used by
ZZZ are not optimal, but you should see the disk activity light (faintly, 
as you are using SSDs).

If you still can't get it working, you'll need to do some surgery to
see what's failing. You'll need to disable X and inteldrm temporarily,
and remove the call to wsdisplay_suspend around line 2370 in
sys/dev/acpi/acpi.c to leave the screen on while ZZZing. Then, initiate
a ZZZ from the text console and see what's going on. Maybe a panic. If you do
this test, remember that the suspending and resuming kernels must match (eg,
if you ZZZ after booting "/bsd.test", make sure you boot "/bsd.test" again
after powering back up or it will discard the hibernated image).

-ml

> 3.  I am running apmd with the -A flag
> 
> 4.  I have 16gb of RAM on the machine
> 
> Thanks in advance for any help.  Some relevant information below:
> 
> $ cat /etc/fstab
> 
> 71b4bf84dbfc9f74.a / ffs rw,softdep,noatime 1 1
> 71b4bf84dbfc9f74.g /home ffs rw,softdep,noatime,nodev,nosuid 1 2
> 71b4bf84dbfc9f74.d /tmp ffs rw,softdep,noatime,nodev,nosuid 1 2
> 71b4bf84dbfc9f74.f /usr ffs rw,softdep,noatime,nodev,wxallowed 1 2
> 71b4bf84dbfc9f74.e /var ffs rw,softdep,noatime,nodev,nosuid 1 2
> /dev/sd0b none swap sw 0 0
> 
> $ doas disklabel -p g sd0
> # /dev/rsd0c:
> type: SCSI
> disk: SCSI disk
> label: Samsung SSD 850
> duid: 25c676a513f5cd3d
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 255
> sectors/cylinder: 16065
> cylinders: 121601
> total sectors: 1953525168 # total bytes: 931.5G
> boundstart: 64
> boundend: 1953520065
> drivedata: 0
> 
> 16 partitions:
> #size   offset  fstype [fsize bsize  cpg]
>a:   899.5G 67119570RAID
>b:32.0G   64swap   # none
>c:   931.5G0  unused
> 
> $ doas disklabel -p g sd2
> # /dev/rsd2c:
> type: SCSI
> disk: SCSI disk
> label: SR CRYPTO
> duid: 71b4bf84dbfc9f74
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 255
> sectors/cylinder: 16065
> cylinders: 117422
> total sectors: 1886399967 # total bytes: 899.5G
> boundstart: 64
> boundend: 1886384430
> drivedata: 0
> 
> 16 partitions:
> #size   offset  fstype [fsize bsize  cpg]
>a: 1.0G   64  4.2BSD   2048 163841 # /
>c:   899.5G0  unused
>d: 4.0G 35904832  4.2BSD   2048 163841 # /tmp
>e:35.7G 44293408  4.2BSD   2048 163841 # /var
>f:   400.0G119248640  4.2BSD   4096 327681 # /usr
>g:   442.6G958100480  4.2BSD   4096 327681 # /home
> 
> $ cat /etc/rc.conf.local
> apmd_flags=-A
> hotplugd_flags=
> httpd_flags=
> pkg_scripts=postgresql nagios php56_fpm slim
> postgresql_flags=-D /var/postgresql/data
> slowcgi_flags=""
> 
> $ swapctl -l
> Device  512-blocks UsedAvail Capacity  Priority
> /dev/sd0b 671195060 67119506 0%0
> 
> dmesg attached as dmesg.txt
> OpenBSD 6.0-beta (GENERIC.MP) #2: Sun Jul  3 10:17:41 EDT 2016
> bceve...@bcebsd.theeverlys.com:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 16844517376 (16064MB)
> avail mem = 16329490432 (15573MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdae9d000 (70 entries)
> bios0: vendor 

Re: can't get vmd to work on current

2016-09-07 Thread Mike Larkin
On Wed, Sep 07, 2016 at 09:55:17PM +0300, Mart T??nso wrote:
> Pardon me, dmesg follows. This is inside a Virtualbox VM for "testing
> purposes".

vmm at mainbus0 not configured

Whatever you're trying to do on your host, it's not passing through
VT-x features.

> 
> OpenBSD 6.0-current (TIMMU) #4: Wed Sep  7 00:35:13 EEST 2016

Not going to help with custom kernels. Work on -current on real
hardware with a standard kernel if you want to play with vmm please.

-ml

> r...@bsd1.lan:/usr/src/sys/arch/amd64/compile/TIMMU
> real mem = 1056899072 (1007MB)
> avail mem = 1020399616 (973MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xe1000 (10 entries)
> bios0: vendor innotek GmbH version "VirtualBox" date 12/01/2006
> bios0: innotek GmbH VirtualBox
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S5
> acpi0: tables DSDT FACP APIC SSDT
> acpi0: wakeup devices
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Pentium(R) CPU G4400 @ 3.30GHz, 3312.50 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,RDRAND,NXE,LONG,LAHF,ABM,3DNOWP,ITSC,RDSEED,CLFLUSHOPT
> cpu0: 256KB 64b/line 8-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: CPU supports MTRRs but not enabled by BIOS
> cpu0: apic clock running at 1009MHz
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Pentium(R) CPU G4400 @ 3.30GHz, 3345.27 MHz
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,RDRAND,NXE,LONG,LAHF,ABM,3DNOWP,ITSC,RDSEED,CLFLUSHOPT
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpicpu0 at acpi0: C1(@1 halt!)
> acpicpu1 at acpi0: C1(@1 halt!)
> "PNP0303" at acpi0 not configured
> "PNP0F03" at acpi0 not configured
> "PNP0501" at acpi0 not configured
> acpiac0 at acpi0: AC unit online
> acpivideo0 at acpi0: GFX0
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
> pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
> pciide0 at pci0 dev 1 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: 128-sector PIO, LBA, 20480MB, 41943040 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: <VBOX, CD-ROM, 1.0> ATAPI 5/cdrom removable
> cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
> vga1 at pci0 dev 2 function 0 "InnoTek VirtualBox Graphics Adapter" rev 0x00
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> em0 at pci0 dev 3 function 0 "Intel 82540EM" rev 0x02: apic 2 int 19, address 
> 08:00:27:4e:af:77
> "InnoTek VirtualBox Guest Service" rev 0x00 at pci0 dev 4 function 0 not 
> configured
> ohci0 at pci0 dev 6 function 0 "Apple Intrepid USB" rev 0x00: apic 2 int 22, 
> version 1.0
> piixpm0 at pci0 dev 7 function 0 "Intel 82371AB Power" rev 0x08: apic 2 int 23
> iic0 at piixpm0
> isa0 at pcib0
> isadma0 at isa0
> com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> pckbc0 at isa0 port 0x60/5 irq 1 irq 12
> pckbd0 at pckbc0 (kbd slot)
> wskbd0 at pckbd0: console keyboard, using wsdisplay0
> pms0 at pckbc0 (aux slot)
> wsmouse0 at pms0 mux 0
> pcppi0 at isa0 port 0x61
> spkr0 at pcppi0
> usb0 at ohci0: USB revision 1.0
> uhub0 at usb0 configuration 1 interface 0 "Apple OHCI root hub" rev 1.00/1.00 
> addr 1
> vmm at mainbus0 not configured
> vscsi0 at root
> scsibus2 at vscsi0: 256 targets
> softraid0 at root
> scsibus3 at softraid0: 256 targets
> root on wd0a (0726640cbb73e288.a) swap on wd0b dump on wd0b
> o
> On Wed, Sep 07, 2016 at 08:50:02AM -0700, Mike Larkin wrote:
> > On Wed, Sep 07, 2016 at 09:43:47PM +0300, Mart T??nso wrote:
> > > Hello,
> > > 
> > > I'm trying to get vmd working, but am failing so far.
> > > 
> > > What I've done:
> > > 
> > > Custom kernel config to enable vmm:
> > > 
> > > include "arch/amd64/conf/GENERIC"
> > > 

Re: can't get vmd to work on current

2016-09-07 Thread Mike Larkin
On Wed, Sep 07, 2016 at 09:43:47PM +0300, Mart T??nso wrote:
> Hello,
> 
> I'm trying to get vmd working, but am failing so far.
> 
> What I've done:
> 
> Custom kernel config to enable vmm:
> 
> include "arch/amd64/conf/GENERIC"
> 
> option  MULTIPROCESSOR
> #option MP_LOCKDEBUG
> 
> cpu*at mainbus?
> 
> # enable vmm
> vmm0   at mainbus0
> # EOF
> 
> 
> /etc/vm.conf:
> # vm.conf
> sets="/var/www/htdocs/pub/OpenBSD/snapshots/amd64/"
> 
> # OpenBSD snapshot install test
> vm "openbsd.vm" {
> memory 512M
> kernel $sets "bsd.rd"
> 
> # First disk from 'vmctl create "/home/vm/OpenBSD.img" -s 4G'
> disk "/home/vm/OpenBSD.img"
> 
> # Second disk from OpenBSD contains the install sets
> disk $sets "install59.fs"
> 
> # Interface will show up as tap(4) on the host and as vio(4) in the VM
> interfaces 1
> }
> # EOF
> 
> 
> And this is where it all falls apart:
> 
> # vmd -vd
> vmd: /dev/vmm: Operation not supported by device
> 
> 
> What am I missing here?
> 
> ---
> Regards,
> 
> Mart
> 

Probably unsupported cpu. But you didn't give us even a dmesg, so who knows.



Re: i386 or amd64?

2016-09-20 Thread Mike Larkin
On Tue, Sep 20, 2016 at 08:36:40PM -0700, Mike Larkin wrote:
> On Tue, Sep 20, 2016 at 05:38:50PM -0600, Jeff Ross wrote:
> > Hi all,
> > 
> > I've had a server with corenetworks for quite a few years now but after
> > changes at corenetworks (their recent name change after acquisition by
> > another company, no current servers available, no communication about the
> > change of ownership with existing customers and an email exchange with
> > sales@), I've decided it is best jump ship now rather than wait for a hard
> > and possibly immediate deadline.
> > 
> > I've just rented a server with 8GB of ram from m5hosting (based in large
> > part from the many recommendations I read while searching misc@ on
> > marc.info).  Now the question is: i386 which is what I've always run on my 2
> > GB ram server, or amd64? http://www.openbsd.org/amd64.html and
> > http://www.openbsd.org/i386.html are curiously silent on the amount of ram
> > that can be accessed.  If I have 8GB, I for sure want to use it all.
> 
> Then your only choice is amd64. PAE, as discussed below, is only used to
> enable NX, and not for "gigantisch memory i386".
> 

Also, to answer the concern you posed below more directly, any recent CPU
will have NX.

> -ml
> 
> > 
> > I know there was a time when i386 was limited to the amount of ram it can
> > access (32 bit) but now amd64 has this caveat: "(Some Intel processors lack
> > support for important PAE NX bit, which means those machines will run
> > without any W^X support -- it is thus safer to run those machines in i386
> > mode)."  How does this fit with the recent work in 6.0+?  How can I tell if
> > the Xeon 3220 processor has the PAE NX bit? I see nothing in the tech sheet
> > about PAE NX. 
> > http://ark.intel.com/products/28034/Intel-Xeon-Processor-X3220-8M-Cache-2_40-GHz-1066-MHz-FSB
> > 
> > I have a little less than 2 weeks to make the transition so not a lot of
> > time for install and try.
> > 
> > Thanks in advance for any suggestions--dmesgs supplied once I get access.
> > 
> > Jeff Ross
> > 
> > Open Vistas Networking



Re: i386 or amd64?

2016-09-20 Thread Mike Larkin
On Tue, Sep 20, 2016 at 05:38:50PM -0600, Jeff Ross wrote:
> Hi all,
> 
> I've had a server with corenetworks for quite a few years now but after
> changes at corenetworks (their recent name change after acquisition by
> another company, no current servers available, no communication about the
> change of ownership with existing customers and an email exchange with
> sales@), I've decided it is best jump ship now rather than wait for a hard
> and possibly immediate deadline.
> 
> I've just rented a server with 8GB of ram from m5hosting (based in large
> part from the many recommendations I read while searching misc@ on
> marc.info).  Now the question is: i386 which is what I've always run on my 2
> GB ram server, or amd64? http://www.openbsd.org/amd64.html and
> http://www.openbsd.org/i386.html are curiously silent on the amount of ram
> that can be accessed.  If I have 8GB, I for sure want to use it all.

Then your only choice is amd64. PAE, as discussed below, is only used to
enable NX, and not for "gigantisch memory i386".

-ml

> 
> I know there was a time when i386 was limited to the amount of ram it can
> access (32 bit) but now amd64 has this caveat: "(Some Intel processors lack
> support for important PAE NX bit, which means those machines will run
> without any W^X support -- it is thus safer to run those machines in i386
> mode)."  How does this fit with the recent work in 6.0+?  How can I tell if
> the Xeon 3220 processor has the PAE NX bit? I see nothing in the tech sheet
> about PAE NX. 
> http://ark.intel.com/products/28034/Intel-Xeon-Processor-X3220-8M-Cache-2_40-GHz-1066-MHz-FSB
> 
> I have a little less than 2 weeks to make the transition so not a lot of
> time for install and try.
> 
> Thanks in advance for any suggestions--dmesgs supplied once I get access.
> 
> Jeff Ross
> 
> Open Vistas Networking



Re: OpenBSD 6-stable vmd

2016-10-26 Thread Mike Larkin
On Wed, Oct 26, 2016 at 06:36:25PM -0500, Ax0n wrote:
> I'm running vmd with the options you specified, and using tee(1) to peel it
> off to a file while I can still watch what happens in the foreground. It
> hasn't happened again yet, but I haven't been messing with the VMs as much
> this week as I was over the weekend.
> 
> One thing of interest: inside the VM running the Oct 22 snapshot, top(1)
> reports the CPU utilization hovering over 1.0 load, with nearly 100% in
> interrupt state, which seems pretty odd to me.  I am also running an i386
> and amd64 vm at the same time, both on 6.0-Release and neither of them are
> exhibiting this high load. I'll probably update the snapshot of the
> -CURRENT(ish) VM tonight, and the snapshot of my host system (which is also
> my daily driver) this weekend.
> 

I've seen that (and have seen it reported) from time to time as well. This
is unlikely time being spent in interrupt, it's more likely a time accounting
error that's making the guest think it's spending more in interrupt servicing
than it actually is. This is due to the fact that both the statclock and
hardclock are running at 100Hz (or close to it) because the host is unable
to inject more frequent interrupts.

You might try running the host at 1000Hz and see if that fixes the problem.
It did, for me. Note that such an adjustment is really a hack and should
just be viewed as a temporary workaround. Of course, don't run your guests
at 1000Hz as well (that would defeat the purpose of cranking the host). That
parameter can be adjusted in param.c.

-ml

> load averages:  1.07,  1.09,  0.94   vmmbsd.labs.h-i-r.net
> 05:05:27
> 26 processes: 1 running, 24 idle, 1 on processor   up
>  0:28
> CPU states:  0.0% user,  0.0% nice,  0.4% system, 99.6% interrupt,  0.0%
> idle
> Memory: Real: 21M/130M act/tot Free: 355M Cache: 74M Swap: 0K/63M
> 
>   PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU COMMAND
> 1 root  100  420K  496K idle  wait  0:01  0.00% init
> 13415 _ntp   2  -20  888K 2428K sleep poll  0:00  0.00% ntpd
> 15850 axon   30  724K  760K sleep ttyin 0:00  0.00% ksh
> 42990 _syslogd   20  972K 1468K sleep kqread0:00  0.00% syslogd
> 89057 _pflogd40  672K  424K sleep bpf   0:00  0.00% pflogd
>  2894 root   20  948K 3160K sleep poll  0:00  0.00% sshd
> 85054 _ntp   20  668K 2316K idle  poll  0:00  0.00% ntpd
> 
> 
> 
> On Tue, Oct 25, 2016 at 2:09 AM, Mike Larkin <mlar...@azathoth.net> wrote:
> 
> > On Mon, Oct 24, 2016 at 11:07:32PM -0500, Ax0n wrote:
> > > Thanks for the update, ml.
> > >
> > > The VM Just did it again in the middle of backspacing over uname -a...
> > >
> > > $ uname -a
> > > OpenBSD vmmbsd.labs.h-i-r.net 6.0 GENERIC.MP#0 amd64
> > > $ un   <-- frozen
> > >
> > > Spinning like mad.
> > >
> >
> > Bizarre. If it were I, I'd next try killing all vmd processes and
> > running vmd -dvvv from a root console window and look for what it dumps
> > out when it hangs like this (if anything).
> >
> > You'll see a fair number of "vmd: unknown exit code 1" (and 48), those
> > are harmless and can be ignored, as can anything that vmd dumps out
> > before the vm gets stuck like this.
> >
> > If you capture this and post somewhere I can take a look. You may need to
> > extract the content out of /var/log/messages if a bunch gets printed.
> >
> > If this fails to diagnose what happens, I can work with you off-list on
> > how to debug further.
> >
> > -ml
> >
> > > [axon@transient ~]$ vmctl status
> > >ID   PID VCPUSMAXMEMCURMEM  TTY NAME
> > > 2  2769 1 512MB 149MB   /dev/ttyp3 -c
> > > 1 48245 1 512MB 211MB   /dev/ttyp0 obsdvmm.vm
> > > [axon@transient ~]$ ps aux | grep 48245
> > > _vmd 48245 98.5  2.3 526880 136956 ??  Rp 1:54PM   47:08.30 vmd:
> > > obsdvmm.vm (vmd)
> > >
> > > load averages:  2.43,  2.36,
> > > 2.26
> > > transient.my.domain 18:29:10
> > > 56 processes: 53 idle, 3 on
> > > processor
> > > up  4:35
> > > CPU0 states:  3.8% user,  0.0% nice, 15.4% system,  0.6% interrupt, 80.2%
> > > idle
> > > CPU1 states: 15.3% user,  0.0% nice, 49.3% system,  0.0% interrupt, 35.4%
> > > idle
> > > CPU2 states:  6.6% user,  0.0% nice, 24.3% system,  0.0% interrupt, 69.1%
> > > idle
> > > CPU3 states:  4.7% user,  0.0% nice, 18.1% system,  0.0% interrupt, 77.2%
> > > idle

Re: VMM test

2016-10-12 Thread Mike Larkin
On Wed, Oct 12, 2016 at 05:17:19PM +0200, Lampshade wrote:
> >> Hi Everybody,
> >>
> >> I would like to give a try to vmm. If I do so, which os can I expect
> >> to make it work? openbsd ok I guess. Linux? Windows?
> 
> >OpenBSD only, as of now.
> 
> Does it support both i386 and amd64 OpenBSDs guests?
> 

yes



Re: OpenBSD 6-stable vmd

2016-10-24 Thread Mike Larkin
On Mon, Oct 24, 2016 at 07:36:48PM -0500, Ax0n wrote:
> I suppose I'll ask here since it seems on-topic for this thread. Let me
> know if I shouldn't do this in the future. I've been testing vmm for
> exactly a week on two different snapshots. I have two VMs: One running the
> same snapshot (amd64, Oct 22) I'm running on the host vm, the other running
> amd64 6.0-RELEASE with no patches of any kind.
> 
> For some reason, the vm running a recent snapshot locks up occasionally
> while I'm interacting with it via cu or occasionally ssh. Should I expect a
> ddb prompt and/or kernel panic messages via the virtualized serial console?
> Is there some kind of "break" command on the console to get into ddb when
> it appears to hang? A "No" or "Not yet" on those two questions would
> suffice if not possible. I know this isn't supported, and appreciate the
> hard work.
> 
> Host dmesg:
> http://stuff.h-i-r.net/2016-10-22.Aspire5733Z.dmesg.txt
> 
> VM (Oct 22 Snapshot) dmesg:
> http://stuff.h-i-r.net/2016-10-22.vmm.dmesg.txt
> 

These look fine. Not sure why it would have locked up. Is the associated vmd
process idle, or spinning like mad?

-ml

> Second:
> I'm using vm.conf (contents below) to start the aforementioned snapshot vm
> at boot.
> There's a "disable" line inside vm.conf to keep one VM from spinning up
> with vmd.  Is there a way to start this one with vmctl aside from passing
> all the options to vmctl as below?
> 
> doas vmctl start -c -d OBSD-RELa -i 1 -k /home/axon/obsd/amd64/bsd -m 512M
> 
> I've tried stuff along the lines of:
> doas vmctl start OBSD-RELa.vm
> 
> vm "obsdvmm.vm" {
> memory 512M
> kernel "bsd"
> disk "/home/axon/vmm/OBSD6"
> interface tap
> }
> vm "OBSD-RELa.vm" {
> memory 512M
> kernel "/home/axon/obsd/amd64/bsd"
> disk "/home/axon/vmm/OBSD-RELa"
> interface tap
> disable
> }
> 

I think this is being worked on, but not done yet.

-ml



Re: OpenBSD 6-stable vmd

2016-10-25 Thread Mike Larkin
On Mon, Oct 24, 2016 at 11:07:32PM -0500, Ax0n wrote:
> Thanks for the update, ml.
> 
> The VM Just did it again in the middle of backspacing over uname -a...
> 
> $ uname -a
> OpenBSD vmmbsd.labs.h-i-r.net 6.0 GENERIC.MP#0 amd64
> $ un   <-- frozen
> 
> Spinning like mad.
> 

Bizarre. If it were I, I'd next try killing all vmd processes and
running vmd -dvvv from a root console window and look for what it dumps
out when it hangs like this (if anything).

You'll see a fair number of "vmd: unknown exit code 1" (and 48), those
are harmless and can be ignored, as can anything that vmd dumps out
before the vm gets stuck like this.

If you capture this and post somewhere I can take a look. You may need to
extract the content out of /var/log/messages if a bunch gets printed.

If this fails to diagnose what happens, I can work with you off-list on
how to debug further.

-ml

> [axon@transient ~]$ vmctl status
>ID   PID VCPUSMAXMEMCURMEM  TTY NAME
> 2  2769 1 512MB 149MB   /dev/ttyp3 -c
> 1 48245 1 512MB 211MB   /dev/ttyp0 obsdvmm.vm
> [axon@transient ~]$ ps aux | grep 48245
> _vmd 48245 98.5  2.3 526880 136956 ??  Rp 1:54PM   47:08.30 vmd:
> obsdvmm.vm (vmd)
> 
> load averages:  2.43,  2.36,
> 2.26
> transient.my.domain 18:29:10
> 56 processes: 53 idle, 3 on
> processor
> up  4:35
> CPU0 states:  3.8% user,  0.0% nice, 15.4% system,  0.6% interrupt, 80.2%
> idle
> CPU1 states: 15.3% user,  0.0% nice, 49.3% system,  0.0% interrupt, 35.4%
> idle
> CPU2 states:  6.6% user,  0.0% nice, 24.3% system,  0.0% interrupt, 69.1%
> idle
> CPU3 states:  4.7% user,  0.0% nice, 18.1% system,  0.0% interrupt, 77.2%
> idle
> Memory: Real: 1401M/2183M act/tot Free: 3443M Cache: 536M Swap: 0K/4007M
> 
>   PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU COMMAND
> 48245 _vmd  430  515M  134M onprocthrslee  47:37 98.00% vmd
>  7234 axon   20  737M  715M sleep poll 33:18 19.14% firefox
> 42481 _x11  550   16M   42M onproc- 2:53  9.96% Xorg
>  2769 _vmd  290  514M   62M idle  thrslee   2:29  9.62% vmd
> 13503 axon  100  512K 2496K sleep nanosle   0:52  1.12% wmapm
> 76008 axon  100  524K 2588K sleep nanosle   0:10  0.73% wmmon
> 57059 axon  100  248M  258M sleep nanosle   0:08  0.34% wmnet
> 23088 axon   20  580K 2532K sleep select0:10  0.00%
> wmclockmon
> 64041 axon   20 3752K   10M sleep poll  0:05  0.00% wmaker
> 16919 axon   20 7484K   20M sleep poll  0:04  0.00%
> xfce4-terminal
> 1 root  100  408K  460K idle  wait  0:01  0.00% init
> 80619 _ntp   2  -20  880K 2480K sleep poll  0:01  0.00% ntpd
>  9014 _pflogd40  672K  408K sleep     bpf   0:01  0.00% pflogd
> 58764 root  100 2052K 7524K idle  wait  0:01  0.00% slim
> 
> 
> 
> On Mon, Oct 24, 2016 at 10:47 PM, Mike Larkin <mlar...@azathoth.net> wrote:
> 
> > On Mon, Oct 24, 2016 at 07:36:48PM -0500, Ax0n wrote:
> > > I suppose I'll ask here since it seems on-topic for this thread. Let me
> > > know if I shouldn't do this in the future. I've been testing vmm for
> > > exactly a week on two different snapshots. I have two VMs: One running
> > the
> > > same snapshot (amd64, Oct 22) I'm running on the host vm, the other
> > running
> > > amd64 6.0-RELEASE with no patches of any kind.
> > >
> > > For some reason, the vm running a recent snapshot locks up occasionally
> > > while I'm interacting with it via cu or occasionally ssh. Should I
> > expect a
> > > ddb prompt and/or kernel panic messages via the virtualized serial
> > console?
> > > Is there some kind of "break" command on the console to get into ddb when
> > > it appears to hang? A "No" or "Not yet" on those two questions would
> > > suffice if not possible. I know this isn't supported, and appreciate the
> > > hard work.
> > >
> > > Host dmesg:
> > > http://stuff.h-i-r.net/2016-10-22.Aspire5733Z.dmesg.txt
> > >
> > > VM (Oct 22 Snapshot) dmesg:
> > > http://stuff.h-i-r.net/2016-10-22.vmm.dmesg.txt
> > >
> >
> > These look fine. Not sure why it would have locked up. Is the associated
> > vmd
> > process idle, or spinning like mad?
> >
> > -ml
> >
> > > Second:
> > > I'm using vm.conf (contents below) to start the aforementioned snapshot
> > vm
> > > at boot.
> > > There's a "disable" line inside vm.conf to keep one VM from 

Re: VMM with Hapertown?

2016-11-23 Thread Mike Larkin
On Wed, Nov 23, 2016 at 01:03:07PM -0500, alexmcwhir...@triadic.us wrote:
> I have some systems with Hapertown CPUS that support VT-x, but not EPT. Does
> vmm currently require EPT to work?
>

for the time being, yes. 



Re: OpenBSD 6-stable vmd

2016-10-27 Thread Mike Larkin
On Thu, Oct 27, 2016 at 11:02:12AM -0500, Ax0n wrote:
> To circle back: I can reproduce the VM lock-up 100% of the time by typing
> too quickly into the VM virtual serial console, such as my password and
> longer command strings that I know by muscle memory.
> 
> I tried a few things such as slowly typing several kilobytes of text into
> the console, one character at a time.
> 
> If I mash the keyboard inside cu, the VM locks up. I went to the text
> console of the VM host (my daily-driver laptop), and slowly decreased the
> keyboard repeat time with:
> 
> wsconsctl keyboard.repeat.deln=
> 
> And then attached to the vm virtual console using "doas vmctl console 1"
> 
> I proceeded to hold down a key and let a few lines of text show up before
> exiting the console, decreasing the deln delay further, and repeating the
> experiment.
> 
> 100 is the default value, so holding a key down (longer than the default
> 400msec value of del1) will result in a 100msec delay between repeat
> keystrokes on input.
> 
> I reduced this first to 75, then to 50, 25, 15, 10, and 5.
> 
> With a repeat delay of 5msec on the virtual console, I was able to reliably
> lock up vms in a few dozen "keystrokes" (a matter of a second or two
> holding a key down).
> 
> I was able to get three different vms to lock up, one running the october
> 22 snapshot, and two others running OpenBSD-6.0 Release, one i386, the
> other amd64.
> 
> I cannot reproduce this, even with a high keyboard repeat rate, though an
> SSH session to any of the VMs.
> 
> Mike and I have been in touch off-list (Thanks again!), but I thought the
> results of my testing were relevant to misc@.
> 

Thanks for testing. I'll see about repro'ing it and take a look presently.

-ml



Re: vmd: /dev/vmm: Operation not supported by device

2016-10-31 Thread Mike Larkin
On Mon, Oct 31, 2016 at 11:09:09AM +0100, Stefan Sperling wrote:
> On Mon, Oct 31, 2016 at 05:56:12PM +0800, johnw wrote:
> > Hi, I know my cpu (Intel E8400) support vt-x/vt-d, but when I run vmd,
> > 
> > vmd: /dev/vmm: Operation not supported by device
> 
> > Is this cpu support to run vmd?
> 
> > vmm0 at mainbus0: VMX
> 
> It seems the current implementation only supports a CPU if dmesg displays
> "VMX/EPT", not just "VMX" (the vmmopen() function only succeeds if EPT
> support is present).
> 

^ this.

I have an old tree with shadow paging support, but it has rotted quite a bit
and probably doesn't work anymore. I took a lot of those extra things out
to simplify development and testing early on (shadow paging, nested VT-x,
AMD SVM, i386, etc). I have since reintegrated i386 and will do the others
moving forward. No ETA.

-ml

> As for if or when this will change, I cannot say.
> 
> Keep in mind that we're not at release yet and that you're testing an
> intermediate state of things. I'd expect that eventually this will either be
> made to work or that vmm will be prevented from attaching on such CPUs.



Re: KERNEL PANIC: HP 250 G5 Notebook PC (W4M67EA)

2017-01-07 Thread Mike Larkin
On Mon, Jan 02, 2017 at 06:55:28AM +0900, Kyoung Jae Seo wrote:
> On Sun, Jan 01, 2017 at 02:00:44PM +0300, Özgür Kazancci wrote:
> > Hello,
> > 
> > Mike, just wanted to ask if you've had any chance of committing anything
> > regarding the issue? Few months have passed and I'm just curious about the
> > issue:
> > 
> > http://marc.info/?l=openbsd-bugs=147626115403928=2
> > 
> > Thanks,
> > Happy New Year OpenBSD!
> > 
> 
> Hi
> 
> OpenBSD stock kernel might not be able to boot in most of newer HP
> laptops. My pavilion also fails to boot because OpenBSD kernel does not
> have ACPI CMOS RTC handler.
> 
> Can you try booting kernel with ec disabled? You don't have to disable
> it in laptop's bios just configure kernel before booting.
> 
> To have better idea of what is actually causing the problem you can
> compile kernel with #define ACPI_DEBUG and boot with it. If it's indeed
> hp ACPI CMOS issue it will fail with message : Unsupported region space
> 5 when kernel crashes.
> 
> I have a wip patch based on linux's implementation but it's too
> invasive and hacky right now for sharing. As soon as I get more time
> I'll open up discussion in tech@ after tidying things up.
> 
> There was discussion on FreeBSD bugs lists of how to handle hp laptop's
> acpi cmos some time ago but developers could not agree on resolution.
> 
> For those interested : 
> https://lists.freebsd.org/pipermail/freebsd-amd64/2016-February/016620.html
> https://wiki.freebsd.org/Laptops/HP_Envy_6Z-1100
> 
> Thanks.
> 

Looks like we do need something like what Kyoung Jae Seo says. I'm happy
to look at a diff but at the moment I don't have the hardware to look into
this (or much free time). Even if the diff is rough, it's probably better
to see what you have earlier rather than later.

-ml



Re: KERNEL PANIC: HP 250 G5 Notebook PC (W4M67EA)

2017-01-07 Thread Mike Larkin
On Sat, Jan 07, 2017 at 03:32:22PM -0800, Mike Larkin wrote:
> On Mon, Jan 02, 2017 at 06:55:28AM +0900, Kyoung Jae Seo wrote:
> > On Sun, Jan 01, 2017 at 02:00:44PM +0300, Özgür Kazancci wrote:
> > > Hello,
> > > 
> > > Mike, just wanted to ask if you've had any chance of committing anything
> > > regarding the issue? Few months have passed and I'm just curious about the
> > > issue:
> > > 
> > > http://marc.info/?l=openbsd-bugs=147626115403928=2
> > > 
> > > Thanks,
> > > Happy New Year OpenBSD!
> > > 
> > 
> > Hi
> > 
> > OpenBSD stock kernel might not be able to boot in most of newer HP
> > laptops. My pavilion also fails to boot because OpenBSD kernel does not
> > have ACPI CMOS RTC handler.
> > 
> > Can you try booting kernel with ec disabled? You don't have to disable
> > it in laptop's bios just configure kernel before booting.
> > 
> > To have better idea of what is actually causing the problem you can
> > compile kernel with #define ACPI_DEBUG and boot with it. If it's indeed
> > hp ACPI CMOS issue it will fail with message : Unsupported region space
> > 5 when kernel crashes.
> > 
> > I have a wip patch based on linux's implementation but it's too
> > invasive and hacky right now for sharing. As soon as I get more time
> > I'll open up discussion in tech@ after tidying things up.
> > 
> > There was discussion on FreeBSD bugs lists of how to handle hp laptop's
> > acpi cmos some time ago but developers could not agree on resolution.
> > 
> > For those interested : 
> > https://lists.freebsd.org/pipermail/freebsd-amd64/2016-February/016620.html
> > https://wiki.freebsd.org/Laptops/HP_Envy_6Z-1100
> > 
> > Thanks.
> > 
> 
> Looks like we do need something like what Kyoung Jae Seo says. I'm happy
> to look at a diff but at the moment I don't have the hardware to look into
> this (or much free time). Even if the diff is rough, it's probably better
> to see what you have earlier rather than later.
> 
> -ml
> 

Also, this is the third time (that I recall) that HP has thrown us a curveball
in their ACPI implementation (although at least this time they seem to be
spec-compliant and it's us missing stuff). Toshiba is another vendor that
tends to do bizarre things.

-ml



Re: specifying rom file for vio(4) in VMM

2017-03-27 Thread Mike Larkin
On Mon, Mar 27, 2017 at 10:59:15AM -0400, Jiri B wrote:
> Is it possible to somehow make VMM to boot from vio with specified
> ROM file (eg. ipxe)?
> 
> j.
> 

Not yet, but loading option roms is possible in seabios, so a diff
to support that would be welcome. We could use that for sgabios too,
to to vga > serial redirection. 



Re: watchdog - "Intel 6300ESB WDT" rev 0x00 at pci0 dev 4 function 0 not configured

2017-03-14 Thread Mike Larkin
On Tue, Mar 14, 2017 at 06:46:52PM -0400, Jiri B wrote:
> Hi,
> 
> I added watchdog device for OpenBSD VM on qemu-kvm and it seems it's not
> detected
> correctly:
> 
> OpenBSD 6.0-current (GENERIC.MP) #167: Sat Feb 11 19:35:52 MST 2017
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 518905856 (494MB)
> avail mem = 498569216 (475MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf7220 (11 entries)
> bios0: vendor Seabios version "0.5.1" date 01/01/2011
> bios0: Red Hat KVM
> acpi0 at bios0: rev 0
> acpi0: sleep states S5
> acpi0: tables DSDT FACP APIC
> acpi0: wakeup devices
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel Core i7 9xx (Nehalem Class Core i7), 1866.90 MHz
> ...
> virtio0 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00
> vio0 at virtio0: address 52:54:00:b8:93:d9
> virtio0: msix shared
> "Intel 6300ESB WDT" rev 0x00 at pci0 dev 4 function 0 not configured
> ...
> 
> # sysctl -a | grep watch
> #
> 
> Shouldn't this be detected as ichwdt(4)?
> 
>   ichwdt(4) - Intel 6300ESB ICH watchdog timer device
> 

Looks like it was only ever "built" for i386, and not extensively tested even
then:

revision 1.411
date: 2005/05/02 17:26:00;  author: grange;  state: Exp;  lines: +2 -1;
Add ichwdt(4): Intel 6300ESB ICH watchdog timer driver. Disabled for
now due to lack of testing. If you have a machine that uses this
device please contact me.

-ml

> # pcidump -v 0:4:0
>  0:4:0: Intel 6300ESB WDT
> 0x: Vendor ID: 8086 Product ID: 25ab
> 0x0004: Command: 0103 Status: 
> 0x0008: Class: 08 Subclass: 80 Interface: 00 Revision: 00
> 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size:
> 00
> 0x0010: BAR mem 32bit addr: 0xfebc1000/0x0010
> 0x0014: BAR empty ()
> 0x0018: BAR empty ()
> 0x001c: BAR empty ()
> 0x0020: BAR empty ()
> 0x0024: BAR empty ()
> 0x0028: Cardbus CIS: 
> 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> 0x0030: Expansion ROM Base Address: 
> 0x0038: 
> 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00
> 
> Libvirt xml part is:
> 
> 
>   
>function='0x0'/>
> 
> 
> Qemu cmd line is:
> 
> qemu 11657 81.6  5.3 1075552 434084 ?  Sl   23:23  17:53
> /usr/libexec/qemu-kvm -name guest=www1,debug-threads=on -S -object
> secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-6-www1/mast
> er-key.aes -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -cpu Nehalem -m 512
> -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid
> e26e7c0c-ea90-45bd-981d-23d471f58162 -nographic -no-user-config -nodefaults
> -device sga -chardev
> socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-6-www1/monitor.sock,s
> erver,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc
> base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet
> -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot
> menu=on,reboot-timeout=0,splash-time=3000,strict=on -device
> ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 -device
> ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5
> -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1
> -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2
> -drive
> file=/dev/data1vg/www1,format=raw,if=none,id=drive-virtio-disk0,cache=none,ai
> o=native -device
> virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio
> -disk0,bootindex=2 -netdev tap,fd=28,id=hostnet0,vhost=on,vhostfd=30 -device
> virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:b8:93:d9,bus=pci.0,addr=0
> x3,bootindex=1 -chardev pty,id=charserial0 -device
> isa-serial,chardev=charserial0,id=serial0 -device
> i6300esb,id=watchdog0,bus=pci.0,addr=0x4 -watchdog-action reset -device
> virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -object
> rng-random,id=objrng0,filename=/dev/random -device
> virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x8 -msg timestamp=on
> 
> Am I doing something wrong or it is a bug?
> 
> j.



Re: how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

2017-03-14 Thread Mike Larkin
On Tue, Mar 14, 2017 at 08:16:17PM -0400, Jiri B wrote:
> Recent dmesg, and VM exits because of virtio-scsi issue when it is installing
> 'bsd.mp'.
> 
> j.
> 

What are you trying to achieve here? Why not just use a device that doesn't
cause errors. You could choose virtio-blk or even a non-PV storage device.

-ml

> Copyright (c) 1982, 1986, 1989, 1991, 1993
> The Regents of the University of California.  All rights reserved.
> Copyright (c) 1995-2017 OpenBSD. All rights reserved.
> https://www.OpenBSD.org
> 
> OpenBSD 6.0-current (RAMDISK_CD) #163: Sat Feb 11 19:41:57 MST 2017
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
> real mem = 250470400 (238MB)
> avail mem = 239251456 (228MB)
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf7170 (10 entries)
> bios0: vendor SeaBIOS version "1.9.1-5.el7_3.1" date 04/01/2014
> bios0: Red Hat KVM
> acpi0 at bios0: rev 0
> acpi0: tables DSDT FACP APIC
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: QEMU Virtual CPU version 2.5+, 2394.37 MHz
> cpu0:
> FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MM
> X,FXSR,SSE,SSE2,SSE3,CX16,x2APIC,HV,NXE,LONG,LAHF
> cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line
> 16-way L2 cache
> cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
> cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
> cpu0: apic clock running at 999MHz
> cpu at mainbus0: not configured
> ioapic0 at mainbus0: apid 0 pa 0xfec0, version 11, 24 pins
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpicpu at acpi0 not configured
> "ACPI0006" at acpi0 not configured
> "PNP0303" at acpi0 not configured
> "PNP0F13" at acpi0 not configured
> "PNP0700" at acpi0 not configured
> "PNP0501" at acpi0 not configured
> "PNP0A06" at acpi0 not configured
> "PNP0A06" at acpi0 not configured
> "PNP0A06" at acpi0 not configured
> "ACPI0010" at acpi0 not configured
> pvbus0 at mainbus0: KVM
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
> "Intel 82371SB ISA" rev 0x00 at pci0 dev 1 function 0 not configured
> pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel 0
> wired to compatibility, channel 1 wired to compatibility
> pciide0: channel 0 disabled (no drives)
> pciide0: channel 1 disabled (no drives)
> "Intel 82371AB Power" rev 0x03 at pci0 dev 1 function 3 not configured
> virtio0 at pci0 dev 2 function 0 "Qumranet Virtio Network" rev 0x00
> vio0 at virtio0: address 52:54:00:15:b0:a3
> virtio0: msix shared
> virtio1 at pci0 dev 3 function 0 "Qumranet Virtio SCSI" rev 0x00
> vioscsi0 at virtio1: qsize 128
> scsibus0 at vioscsi0: 255 targets
> sd0 at scsibus0 targ 0 lun 0:  SCSI3 0/direct
> fixed
> sd0: 20480MB, 512 bytes/sector, 41943040 sectors, thin
> virtio1: msix shared
> uhci0 at pci0 dev 4 function 0 "Intel 82801I USB" rev 0x03: apic 0 int 11
> uhci1 at pci0 dev 4 function 1 "Intel 82801I USB" rev 0x03: apic 0 int 10
> uhci2 at pci0 dev 4 function 2 "Intel 82801I USB" rev 0x03: apic 0 int 10
> ehci0 at pci0 dev 4 function 7 "Intel 82801I USB" rev 0x03: apic 0 int 11
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00
> addr 1
> virtio2 at pci0 dev 5 function 0 "Qumranet Virtio Memory" rev 0x00
> virtio2: no matching child driver; not configured
> usb1 at uhci0: USB revision 1.0
> uhub1 at usb1 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
> addr 1
> usb2 at uhci1: USB revision 1.0
> uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
> addr 1
> usb3 at uhci2: USB revision 1.0
> uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
> addr 1
> isa0 at mainbus0
> com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> com0: console
> pckbc0 at isa0 port 0x60/5 irq 1 irq 12
> pckbd0 at pckbc0 (kbd slot)
> wskbd0 at pckbd0 mux 1
> softraid0 at root
> scsibus1 at softraid0: 256 targets
> PXE boot MAC address 52:54:00:15:b0:a3, interface vio0
> root on rd0a swap on rd0b dump on rd0b
> erase ^?, werase ^W, kill ^U, intr ^C, status ^T
> 
> Welcome to the OpenBSD/amd64 6.0 installation program.
> Starting non-interactive mode in 5 seconds...
> (I)nstall, (U)pgrade, (A)utoinstall or (S)hell?
> DHCPDISCOVER on vio0 - interval 1
> DHCPDISCOVER on vio0 - interval 1
> DHCPOFFER from 192.168.1.1 (00:25:90:60:8f:1e)
> DHCPREQUEST on vio0 to 255.255.255.255
> DHCPACK from 192.168.1.1 (00:25:90:60:8f:1e)
> bound to 192.168.1.118 -- renewal in 1800 seconds.
> Fetching
> http://192.168.1.2/52:54:00:15:b0:a3-install.conf?path=snapshots/amd64
> Performing non-interactive install...
> Terminal type? [vt220] vt220
> System hostname? (short form, e.g. 'foo') test1
> 
> Available network interfaces are: vio0 vlan0.
> Which network interface do you wish to configure? (or 'done') [vio0] vio0
> 

Re: Converting the memory content of a VM to raw physical memory file

2017-04-04 Thread Mike Larkin
On Tue, Apr 04, 2017 at 04:12:53AM -0400, Jiri B wrote:
> I recently had an issue with frozen VM on qemu-kvm and we were discussing
> how to get memory of that VM for investigation.
> 
> How would this be handle with VMM? This could be especially useful for
> troubleshooting VMM VMs running with SeaBIOS.
> 
> We have found this https://github.com/juergh/lqs2mem.py project, it's
> a python script which converts libvirt-QEMU-save (LQS) files to raw memory 
> files.
> 
> So maybe it could be considered for inspiration.
> 
> j.
> 

there is someone working on this but it is not yet ready.



Re: Running Debian in vmd - succes

2017-04-18 Thread Mike Larkin
On Tue, Apr 18, 2017 at 05:45:16PM +0200, Jan Lambertz wrote:
> My process is this:
> 
> Install Debian with qemu to a raw disk file
> Boot Debian
> apt install extlinux
> Install extlinux to /Boot
> Create extlinux cfg
> Write extlinux mbr
> Shutdown qemu vm
> Put raw disk into vmd vm
> Boot vmd vm
> Habe fun
> 
> All extlinux steps can be found via Google,manpages etc. I can post a
> working config tomorrow when i am back in office

We are working on adding sgabios as an additional payload, so that you can
interact directly with OS install media without having to use qemu to
bootstrap the install process. This, however, missed 6.1.

Then you just boot the install media with the VM disk as a second disk,
and install.

This should arrive in the fairly near-term, hopefully.

-ml



Re: git clone failing in vmm

2017-03-03 Thread Mike Larkin
On Sat, Mar 04, 2017 at 01:31:31PM +1300, Carlin Bingham wrote:
> I'm having an issue with git clone failing in a vmm vm. Happens consistently
> for any large trees, example:
> 
> $ git clone https://github.com/openbsd/src.git  
> Cloning into 'src'...
> remote: Counting objects: 1672334, done.
> remote: Compressing objects: 100% (867/867), done.
> fatal: pack has bad object at offset 2242336: inflate returned -5   
> fatal: index-pack failed
> 
> This doesn't happen outside the vm.
> 

Thanks for reporting this. I have seen other similar failures. I think I know
what's going on but I don't have a fix yet. I will let you know when I do.

-ml


> Syslog on the host says this:
> Mar  4 12:12:40 vorpal vmd[99431]: vionet queue notify - no space, dropping 
> packet
> 
> Other downloads (eg. downloading the sets) works fine, it's just git that
> fails.
> 
> Anyone know what the problem might be or how to prevent it?
> 
> 
> The network on the host looks like this:
> 
> vether0: flags=8943 mtu 1500
> lladdr fe:e1:ba:d1:a5:21
> index 8 priority 0 llprio 3
> groups: vether
> media: Ethernet autoselect
> status: active
> inet 10.1.1.1 netmask 0xff00 broadcast 10.1.1.255
> bridge0: flags=41
> index 9 llprio 3
> groups: bridge
> priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp
> vether0 flags=3
> port 8 ifpriority 0 ifcost 0
> tap0 flags=3
> port 10 ifpriority 0 ifcost 0
> tap0: flags=8942 mtu 1500
> lladdr fe:e1:ba:d2:bb:43
> description: vm2-if0-tmpvm
> index 10 priority 0 llprio 3
> groups: tap
> status: active
> 
> -- 
> Carlin



Re: git clone failing in vmm

2017-03-14 Thread Mike Larkin
On Sat, Mar 04, 2017 at 01:31:31PM +1300, Carlin Bingham wrote:
> I'm having an issue with git clone failing in a vmm vm. Happens consistently
> for any large trees, example:
> 
> $ git clone https://github.com/openbsd/src.git  
> Cloning into 'src'...
> remote: Counting objects: 1672334, done.
> remote: Compressing objects: 100% (867/867), done.
> fatal: pack has bad object at offset 2242336: inflate returned -5   
> fatal: index-pack failed
> 
> This doesn't happen outside the vm.
> 
> Syslog on the host says this:
> Mar  4 12:12:40 vorpal vmd[99431]: vionet queue notify - no space, dropping 
> packet
> 
> Other downloads (eg. downloading the sets) works fine, it's just git that
> fails.
> 
> Anyone know what the problem might be or how to prevent it?
> 

I can reproduce this, although it's not the problem I thought it was.

I'll see if I can get some time to look into this soon, but I am starting
to get a bit backlogged with vmm work.

-ml



Re: New features in VMM for OpenBSD 6.1?

2017-03-06 Thread Mike Larkin
On Mon, Mar 06, 2017 at 06:22:07PM +0100, Juan Francisco Cantero Hurtado wrote:
> On Mon, Mar 06, 2017 at 10:40:52AM +, C. L. Martinez wrote:
> > Hi all,
> > 
> >  Where can I see what new features will be released in VMM for OpenBSD 6.1? 
> > For example, it could be possible to run linux or freebsd guests apart of 
> > openbsd guests?
> 
> No, vmm will only support OpenBSD in the next release.
> https://www.openbsd.org/61.html will include a list of new features and
> fixes.
> 
> -- 
> Juan Francisco Cantero Hurtado http://juanfra.info
>

As Juan states, I'm sure someone will go back through the cvs logs and update
that page with what new changes/features went in. Probably the biggest change
will be adding SVM support, if I can manage to get the last +/- 900 lines of
local changes in, and add interrupt windowing support.

-ml



Re: [vmm] SSL read error: read failed: error:06FFF064:digital envelope routines:CRYPTO_internal:bad decrypt

2017-04-17 Thread Mike Larkin
On Mon, Apr 17, 2017 at 10:29:31AM +, Paul Chakravarti wrote:
> >On 2017-04-17, David Coppa  wrote:
> >> On Sun, Apr 16, 2017 at 11:17 AM, Paul Chakravarti  
> >> wrote:
> >>> Hello,
> >>>
> >>> I am trying out vmm on 6.1 and can setup/boot vm etc. however when I try 
> >>> to
> >>> download a large file using SSL I consistenetly get the following error:
> >>>
>  SSL read error: read failed: error:06FFF064:digital envelope
> >>> routines:CRYPTO_internal:bad decrypt
> >>>
> >>> This occasionally (but not always) correlates with the following message 
> >>> in
> >>> the vmd log:
> >>>
>  vionet queue notify - no space, dropping packet
> >>>
> >>> Strangely non-SSL and smaller SSL downloads seem to work ok (see below).
> >>>
> >>> Originally spotted this using installer but can recreate from shell.
> >>>
> >>> Any ideas?
> >>
> >> See http://marc.info/?l=openbsd-misc=148858752003261
> >>
> >> It's a known problem.
> >
> >I've seen corruption with non-SSL network transfers too. It's just more
> >obvious with SSL because in that case the session gets killed, whereas
> >otherwise the corrupt input is silently accepsilently accepted.
> >
> 
> It does seem more prevalent with SSL transfers - the SHA256s of the files 
> transferred vis http are correct (over several transfers) while there is 
> always an always an error on the https transfers from the same site.
> 
> Interestingly the problem only seems to come up on 'fast' connections - 
> possibly something CPU related (cpu load exacerbated by SSL?). I'm still not 
> sure why the TCP layer doesn't sort out the dropped packets though.
> 
> # ftp -Vo- https://ftp.openbsd.org/pub/OpenBSD/6.1/amd64/bsd | sha256 
>  
> 440311305f27f0efcfcc88116299a21cb3f890fb91ee611c2a79cc9163e8fceb
> # 
> # 
> # ftp -Vo- https://mirrorservice.org/pub/OpenBSD/6.1/amd64/bsd | sha256
> ftp: SSL read error: read failed: error:06FFF064:digital envelope 
> routines:CRYPTO_internal:bad decrypt

I think I know what's going on, I just haven't had time to sort through it yet.
I don't think it's related to the network stack, FWIW.

-ml



Re: Calculate the frequency of the tsc timecounter

2017-07-31 Thread Mike Larkin
On Mon, Jul 31, 2017 at 07:19:36AM +0800, Adam Steen wrote:
> Sorry, i sent that before i had finished.
> 
> I am trying to find an equivalent of the following code for FreeBSD
> 
> size_t outsz = sizeof bi->cpu.tsc_freq;
> int ret = sysctlbyname("machdep.tsc_freq", >cpu.tsc_freq, , 
> NULL,
> 0);
> if (ret == -1)
> err(1, "sysctl(machdep.tsc_freq)");
> int invariant_tsc = 0;
> outsz = sizeof invariant_tsc;
> ret = sysctlbyname("kern.timecounter.invariant_tsc", _tsc, 
> ,
> NULL, 0);
> if (ret == -1)
> err(1, "sysctl(kern.timecounter.invariant_tsc");
> if (invariant_tsc != 1)
> errx(1, "Host TSC is not invariant, cannot continue");
> 
> 
> line 122-134 of
> https://github.com/adamsteen/solo5/blob/master/ukvm/ukvm_hv_freebsd_x86_64.c
> 
> Currently the port fails with "vmx_handle_exit: unhandled exit
> 2147483681 (unknown)" (0x8021 in hex), I am setting up the
> registers to incorrect values, but need to read more to understand
> what OpenBSD vmm and ukvm are expecting from each other.
> 

If you point me to a bootable image that causes this failure, I might be
able to figure out what vmm(4) doesn't like.

Nothing in lines 122-134 of the file indicated above should cause this.

-ml

> Cheers
> Adam
> 
> > Hi Mike
> >
> > In short i don't want to calculate the TSC frequency, i would like to
> > get it from the kernel if possible? (also checking if it was
> > invariant.) I knew my code was inaccurate, but didn't know another
> > way.
> >
> > I did check the output of dmesg: "cpu0: TSC frequency 2492310500 Hz',
> > but couldn't find a away to get this programmatically, eg via sysctl
> >
> > Long story, i am in the process of porting Solo5 to OpenBSD (see
> > https://github.com/adamsteen/solo5) and need the tsc frequency to
> > support the ukvm tsc clock.
> >
> > Is there currently a way to get the TSC frequency programmatically?
> > and is CPUID the best way to check if the tsc is invariant?
> > (CPUID.8007H:EDX[8], Intel's Designer's vol3b, section 16.11.1
> > Invariant TSC)
> >
> > On Mon, Jul 31, 2017 at 1:57 AM, Mike Belopuhov  wrote:
> >> On Wed, Jul 26, 2017 at 19:24 +0800, Adam Steen wrote:
> >>> Hi
> >>>
> >>> Is there an easy/accurate way to calculate the tsc timecounter frequency?
> >>> like Time Stamp Counters  on Linux. (on a
> >>> Sandy Bridge cpu)
> >>>
> >>> Another reference Converting Sandy Bridge TSC to wall clock time
> >>> .
> >>>
> >>> The code below works but i don't really know how accurate it is, at best
> >>> 10,000 Hz.
> >>>
> >>> Cheers
> >>> Adam
> >>>
> >>
> >> Hi,
> >>
> >> First of all it's not clear why do you want to calculate TSC
> >> frequency in the userland program?  The kernel does it and
> >> prints the result to the system message buffer (viewed with
> >> the dmesg command).
> >>
> >> The second thing worth pointing out is that gettimeofday is a
> >> syscall that queries the timestamp from the timecounter code
> >> (updated every 10ms) with a current delta read directly from
> >> the hardware so that you get an accurate reading, but then
> >> it's adjusted according to the system time adjustment rules
> >> imposed by things like NTP and settimeofday, so essentially
> >> it's not monotonic (unless you can ensure there is no actor
> >> present that is adjusting the time while you're performing
> >> your measurement).  There's also a way for userland to query
> >> a precise monotonically increasing timestamp: clock_gettime
> >> with CLOCK_MONOTONIC as the clock_id.  In this case the
> >> returned timestamp is relative to the moment the system was
> >> brought up but this doesn't matter if all you need is
> >> difference.
> >>
> >> The third thing to know is where does this hardware reading
> >> comes from and what's its precision.  Running "sysctl -n
> >> kern.timecounter.hardware" will tell you what is currently
> >> selected as the source and then you can locate that device
> >> your dmesg (with exception of i8254 -- that 1.19Mhz PIT).
> >> For instance on my laptop it's ACPI HPET that is proving a
> >> running counter with the frequency of 14 MHz. This is what's
> >> going to limit the precision of your measurement.
> >>
> >> To get a better reading you may try to take a series of say
> >> 10 measurements and calculate the average.
> >>
> >> The difference between RDTSC and RDTSCP is that the latter
> >> tells you on which CPU the instruction was executed.  This
> >> poses a valid question: is TSC frequency the same on a multi-
> >> socket system.  And I don't have an answer for that one.
> >> AFAIU, this boils down to the motherboard design and if the
> >> manufacturer has selected to use different quartz crystals
> >> for different sockets, then as we know for a fact that no two
> >> quartz crystals are created the same and thus frequency
> >> sourced from 

Re: Calculate the frequency of the tsc timecounter

2017-08-01 Thread Mike Larkin
On Tue, Aug 01, 2017 at 07:32:19AM +0800, Adam Steen wrote:
> On Tue, Aug 1, 2017 at 7:26 AM, Adam Steen <a...@adamsteen.com.au> wrote:
> > Mike Belopuhov wrote:
> >
> >> To be able to use TSC as a timecounter source on OpenBSD or Solo5
> >> you'd have to improve the in-kernel measurement of the TSC frequency
> >> first. I've tried to perform 10 measurements and take an average and
> >> it does improve accuracy, however I believe we need to poach another
> >> bit from Linux and re-calibrate TSC via HPET:
> >>
> >>  
> >> http://elixir.free-electrons.com/linux/v4.12.4/source/arch/x86/kernel/tsc.c#L409
> >>
> >> I think this is the most sane thing we can do. Here's a complete
> >> procedure that Linux kernel undertakes:
> >>
> >>  
> >> http://elixir.free-electrons.com/linux/v4.12.4/source/arch/x86/kernel/tsc.c#L751
> >>
> >> Regards,
> >> Mike
> >
> > Looks like i have more sort out!
> >
> > Mike Larkin wrote:
> >> If you point me to a bootable image that causes this failure, I might be
> >> able to figure out what vmm(4) doesn't like.
> >>
> >> Nothing in lines 122-134 of the file indicated above should cause this.
> >
> > This is where things get a little more interesting, Solo5
> > (https://github.com/adamsteen/solo5) is actually two parts Solo5 the
> > Unikernel and ukvm the userland side of a hypervisor (currently
> > running with kvm and bhyve), I have been porting to run ukvm directly
> > with vmm. I expect the cause of "vmx_handle_exit: unhandled exit
> > 2147483681 (unknown)" is the register setup in
> > https://github.com/adamsteen/solo5/blob/master/ukvm/ukvm_hv_openbsd_x86_64.c,
> > lines 118-147
> >
> > the constants are ukvm constants.
> >
> > struct vm_resetcpu_params vrp = {
> > .vrp_vm_id = hvb->vcp_id,
> > .vrp_vcpu_id = hvb->vcpu_id,
> > .vrp_init_state = {
> > .vrs_gprs[VCPU_REGS_RFLAGS] = X86_RFLAGS_INIT,
> > .vrs_gprs[VCPU_REGS_RIP] = gpa_ep,
> > .vrs_gprs[VCPU_REGS_RSP] = hv->mem_size - 8,
> > .vrs_gprs[VCPU_REGS_RDI] = X86_BOOT_INFO_BASE,
> > .vrs_crs[VCPU_REGS_CR0] = X86_CR0_INIT,
> > .vrs_crs[VCPU_REGS_CR3] = X86_CR3_INIT,
> > .vrs_crs[VCPU_REGS_CR4] = X86_CR4_INIT,
> > .vrs_sregs[VCPU_REGS_CS] = sreg_to_vsi(_x86_sreg_code),
> > .vrs_sregs[VCPU_REGS_DS] = sreg_to_vsi(_x86_sreg_data),
> > .vrs_sregs[VCPU_REGS_ES] = sreg_to_vsi(_x86_sreg_data),
> > .vrs_sregs[VCPU_REGS_FS] = sreg_to_vsi(_x86_sreg_data),
> > .vrs_sregs[VCPU_REGS_GS] = sreg_to_vsi(_x86_sreg_data),
> > .vrs_sregs[VCPU_REGS_SS] = sreg_to_vsi(_x86_sreg_data),
> > .vrs_gdtr = { 0x0, X86_GDTR_LIMIT, 0x0, X86_GDT_BASE},
> > .vrs_idtr = { 0x0, 0x, 0x0, 0x0},
> > .vrs_sregs[VCPU_REGS_LDTR] = 
> > sreg_to_vsi(_x86_sreg_unusable),
> > .vrs_sregs[VCPU_REGS_TR] = sreg_to_vsi(_x86_sreg_tr),
> > .vrs_msrs[VCPU_REGS_EFER] = X86_EFER_INIT,
> > .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,
> > .vrs_crs[VCPU_REGS_XCR0] = XCR0_X87
> > }
> > };
> >
> > the three specific OpenBSD files are
> > https://github.com/adamsteen/solo5/blob/master/ukvm/ukvm_hv_openbsd.h
> > https://github.com/adamsteen/solo5/blob/master/ukvm/ukvm_hv_openbsd.c
> > https://github.com/adamsteen/solo5/blob/master/ukvm/ukvm_hv_openbsd_x86_64.c
> > with small changes in ukvm/ukvm_elf.c and ukvm/ukvm_module_net.c
> >
> > I could upload a binary image for you but It won't run with vmd its
> > has ukvm specific hypercalls designed to simplify things.
> >
> > Cheers
> > Adam
> >
> > ps i am currently trying to document the differences in what vmm is
> > expecting and ukvm is expecting.
> 

I'd recommend enabling VMM_DEBUG and seeing if that prints more useful
information after the unhandled exit. That error code is usually because of
invalid VMCS content, but since you're rolling your own vmm interface, it's
not clear what might have been missed. If you send me that information
(from dmesg, it will be a lot) I may be able to help.

-ml


> One more thing
> 
> Please note currently i have to build the bootable binary image of
> solo5 with a cross compiler as i have not figured out the
> discrepancies between OpenBSD's ld and solo5's linker script.
> 
> Cheers
> Adam



Re: Calculate the frequency of the tsc timecounter

2017-08-02 Thread Mike Larkin
On Thu, Aug 03, 2017 at 07:56:11AM +0800, Adam Steen wrote:
> On Mon, Jul 31, 2017 at 3:58 PM, Mike Belopuhov <m...@belopuhov.com> wrote:
> > On Mon, Jul 31, 2017 at 09:48 +0800, Adam Steen wrote:
> >> Ted Unangst  wrote:
> >> > we don't currently export this info, but we could add some sysctls. 
> >> > there's
> >> > some cpufeatures stuff there, but generally stuff isn't exported until
> >> > somebody finds a use for it... it shouldn't be too hard to add something 
> >> > to
> >> > amd64/machdep.c sysctl if you're interested.
> >>
> >> I am interested, as i need the info, i will look into it and hopefully
> >> come back with a patch.
> >
> > This is a bad idea because TSC as the time source is only usable
> > by OpenBSD on Skylake and Kaby Lake CPUs since they encode the TSC
> > frequency in the CPUID. All older CPUs have their TSCs measured
> > against the PIT. Currently the measurement done by the kernel isn't
> > very precise and if TSC is selected as a timecounter, the machine
> > would be gaining time on a pace that cannot be corrected by our NTP
> > daemon. (IIRC, about an hour a day on my Haswell running with NTP).
> >
> > To be able to use TSC as a timecounter source on OpenBSD or Solo5
> > you'd have to improve the in-kernel measurement of the TSC frequency
> > first. I've tried to perform 10 measurements and take an average and
> > it does improve accuracy, however I believe we need to poach another
> > bit from Linux and re-calibrate TSC via HPET:
> >
> >  
> > http://elixir.free-electrons.com/linux/v4.12.4/source/arch/x86/kernel/tsc.c#L409
> >
> > I think this is the most sane thing we can do. Here's a complete
> > procedure that Linux kernel undertakes:
> >
> >  
> > http://elixir.free-electrons.com/linux/v4.12.4/source/arch/x86/kernel/tsc.c#L751
> >
> > Regards,
> > Mike
> 
> Hi Mike and Ted
> 
> I understand using the tsc as a timecounter on non Skylake and
> Kabylake processors is inaccurate, but this i my first real foray into
> kernel programming, so wanted to started of slow. below is a diff to
> expose if the tsc is invariant and the tsc frequency via sysctl
> machdep. I would like to get this commited first and then move on to
> improving the in-kernel measurement of the tsc frequency as Mike
> describes above.
> 
> Sorry its taken a while to get back to you I have been working with
> Mike Larkin on vmm and my port of Solo5/ukvm.
> 
> Cheers
> Adam
> 
> comments?
> 

Everything in these sysctls can be obtained from CPUID on the processors you
want (skylake and later), and since that can be called in any CPL, why is
a kernel interface needed for this? The only thing that would be missing is
the tsc frequency on older-than-skylake cpus, but I don't think this is what
you are after, is it? (and even if you wanted this information on < skylake,
as mikeb points out, the accuracy of that value would then be very suspect and
probably not usable anyway).

-ml

> Index: sys/arch/amd64/amd64/identcpu.c
> ===
> RCS file: /cvs/src/sys/arch/amd64/amd64/identcpu.c,v
> retrieving revision 1.87
> diff -u -p -u -p -r1.87 identcpu.c
> --- sys/arch/amd64/amd64/identcpu.c 20 Jun 2017 05:34:41 - 1.87
> +++ sys/arch/amd64/amd64/identcpu.c 2 Aug 2017 23:45:54 -
> @@ -63,6 +63,8 @@ struct timecounter tsc_timecounter = {
>   tsc_get_timecount, NULL, ~0u, 0, "tsc", -1000, NULL
>  };
> 
> +u_int64_t amd64_tsc_freq = 0;
> +int amd64_has_invariant_tsc;
>  int amd64_has_xcrypt;
>  #ifdef CRYPTO
>  int amd64_has_pclmul;
> @@ -566,9 +568,12 @@ identifycpu(struct cpu_info *ci)
>   /* Check if it's an invariant TSC */
>   if (cpu_apmi_edx & CPUIDEDX_ITSC)
>   ci->ci_flags |= CPUF_INVAR_TSC;
> +
> +amd64_has_invariant_tsc = (ci->ci_flags & CPUF_INVAR_TSC) != 0;
>   }
> 
>   ci->ci_tsc_freq = cpu_tsc_freq(ci);
> +amd64_tsc_freq = ci->ci_tsc_freq;
> 
>   amd_cpu_cacheinfo(ci);
> 
> Index: sys/arch/amd64/amd64/machdep.c
> ===
> RCS file: /cvs/src/sys/arch/amd64/amd64/machdep.c,v
> retrieving revision 1.231
> diff -u -p -u -p -r1.231 machdep.c
> --- sys/arch/amd64/amd64/machdep.c 12 Jul 2017 06:26:32 - 1.231
> +++ sys/arch/amd64/amd64/machdep.c 2 Aug 2017 23:45:54 -
> @@ -425,7 +425,9 @@ int
>  cpu_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
>  size_t newlen, struct proc *p)
>  {
> +extern u_int64_t amd64_tsc_freq;
>   extern int amd64_has_xc

Re: vmd errors

2017-08-09 Thread Mike Larkin
; ppb1 at pci0 dev 28 function 3 "Intel 8 Series PCIE" rev 0xe4: msi
> pci2 at ppb1 bus 2
> "Attansic Technology E2200" rev 0x10 at pci2 dev 0 function 0 not configured
> ppb2 at pci0 dev 28 function 4 "Intel 8 Series PCIE" rev 0xe4: msi
> pci3 at ppb2 bus 3
> vendor "NVIDIA", unknown product 0x1392 (class display subclass 3D, rev
> 0xa2) at pci3 dev 0 function 0 not configured
> ehci0 at pci0 dev 29 function 0 "Intel 8 Series USB" rev 0x04: apic 2 int 23
> usb1 at ehci0: USB revision 2.0
> uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev
> 2.00/1.00 addr 1
> pcib0 at pci0 dev 31 function 0 "Intel 8 Series LPC" rev 0x04
> ahci0 at pci0 dev 31 function 2 "Intel 8 Series AHCI" rev 0x04: msi,
> AHCI 1.3
> ahci0: port 0: 6.0Gb/s
> scsibus1 at ahci0: 32 targets
> sd0 at scsibus1 targ 0 lun 0: <ATA, WDC WD5000BPKX-0, 01.0> SCSI3
> 0/direct fixed naa.50014ee6aefdae07
> sd0: 476940MB, 512 bytes/sector, 976773168 sectors
> ichiic0 at pci0 dev 31 function 3 "Intel 8 Series SMBus" rev 0x04: apic
> 2 int 18
> iic1 at ichiic0
> iic1: addr 0x29 07=ff 0f=33 10=0a 11=82 12=1f 13=53 14=b2 15=31 16=20
> 17=29 18=22 19=99 1a=70 1b=75 1c=c0 1e=20 20=7f 22=40 27=ff 29=f6 2b=01
> 2d=40 2f=20 30=95 31=25 32=0e 33=10 87=ff 8f=33 90=0a 91=82 92=1f 93=53
> 94=b2 95=31 96=20 97=29 98=22 99=99 9a=70 9b=75 9c=c0 9e=20 a0=7f a2=40
> a7=ff a9=ef ab=02 ad=3f af=20 b0=95 b1=26 b2=0e b3=10 words 00=
> 01= 02= 03= 04= 05= 06= 07=
> spdmem0 at iic1 addr 0x50: 4GB DDR3 SDRAM PC3-12800 SO-DIMM
> spdmem1 at iic1 addr 0x52: 4GB DDR3 SDRAM PC3-12800 SO-DIMM
> isa0 at pcib0
> isadma0 at isa0
> pckbc0 at isa0 port 0x60/5 irq 1 irq 12
> pckbd0 at pckbc0 (kbd slot)
> wskbd0 at pckbd0: console keyboard, using wsdisplay0
> pms0 at pckbc0 (aux slot)
> wsmouse0 at pms0 mux 0
> pms0: Synaptics clickpad, firmware 8.1
> pcppi0 at isa0 port 0x61
> spkr0 at pcppi0
> vmm0 at mainbus0: VMX/EPT
> error: [drm:pid0:intel_uncore_check_errors] *ERROR* Unclaimed register
> before interrupt
> axe0 at uhub0 port 1 configuration 1 interface 0 "ASIX Electronics
> AX88772" rev 2.00/0.01 addr 2
> axe0: AX88772, address 00:19:fd:4d:f3:7d
> ukphy0 at axe0 phy 16: Generic IEEE 802.3u media interface, rev. 1: OUI
> 0x000ec6, model 0x0001
> uhidev0 at uhub0 port 3 configuration 1 interface 0 "HOLTEK Wireless USB
> Device" rev 1.10/3.01 addr 3
> uhidev0: iclass 3/1
> ukbd0 at uhidev0: 8 variable keys, 6 key codes
> wskbd1 at ukbd0 mux 1
> wskbd1: connecting to wsdisplay0
> uhidev1 at uhub0 port 3 configuration 1 interface 1 "HOLTEK Wireless USB
> Device" rev 1.10/3.01 addr 3
> uhidev1: iclass 3/1, 3 report ids
> uhid0 at uhidev1 reportid 1: input=1, output=0, feature=0
> uhid1 at uhidev1 reportid 2: input=3, output=0, feature=0
> ums0 at uhidev1 reportid 3: 5 buttons, Z dir
> wsmouse1 at ums0 mux 0
> uvideo0 at uhub0 port 6 configuration 1 interface 0
> "CN036P597248751HABEMA00 Integrated_Webcam_FHD" rev 2.00/47.18 addr 4
> video0 at uvideo0
> uhidev2 at uhub0 port 7 configuration 1 interface 0 "Alienware AW13" rev
> 0.02/0.00 addr 5
> uhidev2: iclass 3/0, 2 report ids
> uhid2 at uhidev2 reportid 1: input=8, output=0, feature=0
> uhid3 at uhidev2 reportid 2: input=0, output=8, feature=0
> ugen0 at uhub0 port 8 "Atheros Communications product 0x3004" rev
> 1.10/0.01 addr 6
> uhub2 at uhub1 port 1 configuration 1 interface 0 "Intel Rate Matching
> Hub" rev 2.00/0.04 addr 2
> vscsi0 at root
> scsibus2 at vscsi0: 256 targets
> softraid0 at root
> scsibus3 at softraid0: 256 targets
> root on sd0a (638cdaa08bd52d91.a) swap on sd0b dump on sd0b
> error: [drm:pid13066:hsw_unclaimed_reg_clear] *ERROR* Unknown unclaimed
> register before writing to 101008
> 
> 
> 
> Le 08/06/17 à 20:15, Mike Larkin a écrit :
> (...)
> >>
> > 
> > pkill -9 vmd
> > vmd -dv (will not detach from the console)
> > vmctl log verbose
> > 
> > then try your vmctl again, and send the vmd log messages displayed in the
> > window where vmd is running.
> > 
> > Also send a dmesg please.
> > 
> > We'll start there and see if we need more info.
> > 
> > Thanks for helping test vmd
> > 
> > -ml
> >
> > (...)
> > 
> 
> -- 
> ~ " Fully Basic System Distinguish Life! " ~ " Libre as a BSD "   +=<<<
> 
> Stephane HUC as PengouinBSD or CIOTBSD
> b...@stephane-huc.net
> 




Re: vio(4) stops working with debian 9.0 qemu-2.8+dfsg-6

2017-07-10 Thread Mike Larkin
On Mon, Jul 10, 2017 at 10:22:06PM +0200, Stefan Fritsch wrote:
> On Saturday, 8 July 2017 14:58:59 CEST Stefan Fritsch wrote:
> > A difference between i386 and amd64 is that on amd64, openbsd uses MSI-X for
> > virtio. Maybe legacy interrupts are broken with vhost-net. This needs some
> > more debugging. But its either a bug in qemu or in the linux kernel, not in
> > openbsd.
> 
> It's also broken with amd64 if MSI-X is disabled.
> 
> It's fixed in qemu 2.9. Debian bug report: 
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867978
> 
> Cheers,
> Stefan
> 

Thanks for tracking this down, Stefan!

-ml



Re: Best place for VM images

2017-07-17 Thread Mike Larkin
On Tue, Jul 18, 2017 at 01:52:53AM +0200, Leo Unglaub wrote:
> Hey friends,
> what is the best/recommended place to store the vmm images. In man 5 vm.conf
> is an example with /var/vmm/, is this the best location?
> 
> Also if /var/vmm is its own partition, what would be the best mount options
> for it. I would assume nodev, nosuid are good.
> 
> Any recommendations?
> Thanks and greetings
> Leo
> 

I've been putting mine in a dedicated partition. /var/vmm should probably
be its own partition if used.

nodev, nosuid are probably good choices there too.

-ml



Re: Best place for VM images

2017-07-18 Thread Mike Larkin
On Tue, Jul 18, 2017 at 09:08:10AM -0600, Theo de Raadt wrote:
> > I've been putting mine in a dedicated partition. /var/vmm should probably
> > be its own partition if used.
> > 
> > nodev, nosuid are probably good choices there too.
> 
> That won't work.  People without an additional partition will get these
> mount options.  And anyways those system flags don't make any sense for
> such controlled files.
> 
> Anyways, this stuff should not be in /var at all!
> 
>  /var/  Multi-purpose log, temporary, transient, and spool files.
> 
> Note the word transient.
> 
> These vmm images people are creating are for their own use, and I don't
> think they should be anywhere near a system directory, let alone the
> system directory /var.
> 
> I'd suggest /home/vmm as a good place to store them.
> 

Sure. I don't have a really strong opinion one way or the other. When I
mentioned I put mine in a dedicated partition, I use /data/vmm or various
places in /home if I've already fully partitioned the machine in question.

I think the original mentioning of /var/vmm probably was put in there
based on the similar usage of /var/www, but I won't defend that choice :)

-ml



Re: ntpd clock unsynced in vm

2017-07-18 Thread Mike Larkin
On Tue, Jul 18, 2017 at 08:45:04PM +1000, tomr wrote:
> Good time-of-day,
> 
> In playing with vmd, I'm unable to get the guest's ntpd to sync to its
> upstream ntp (whether that's the host ntpd or poot.ntp.org). The guest
> is losing about 1 second for every 2 that pass. I'm using a recent
> snapshot on both host and guest on a 1st gen thinkpad X1 carbon (dmesgs
> below).
> 

This is a known issue that we have been working (slowly) to resolve. There
are several things contributing to this and we have been knocking them down
one at a time. It's better than it has been, but worse than it should be.

For now, a 1000HZ host *may* make a difference for you but it's probably
still not going to keep perfect time and it's just a workaround anyway.

-ml



Re: Best place for VM images

2017-07-18 Thread Mike Larkin
On Tue, Jul 18, 2017 at 09:15:41AM -0600, Theo de Raadt wrote:
> > Sure. I don't have a really strong opinion one way or the other. When I
> > mentioned I put mine in a dedicated partition, I use /data/vmm or various
> > places in /home if I've already fully partitioned the machine in question.
> 
> I don't think a seperate partition is neccessary.
> 
> However I think this should stop saying /var/anything right away, because
> that is leading people in the wrong direction.
> 

Please go ahead, I don't have any attachment to /var, feel free to update
the man page to something different.

-ml



Re: vmd on Proliant DL360p Gen8: panic

2017-07-27 Thread Mike Larkin
On Wed, Jul 26, 2017 at 12:52:01PM +0200, Joaquín Herrero Pintado wrote:
> Hi,
> 
> I'm just trying vmm from OpenBSD 6.1 on a HP Proliant DL360p Gen8 and I'm
> having some issues I want to share just to help developers. I will be glad
> in using this machine to host a bunch of OpenBSD machines with relayd,
> httpd, etc to host services and help balancing other services from my
> organisation.
> 
> Here are the things I detected:
> 
> 1. In spite of booting bsd (or bsd.mp) from cd0a, after this the device cd0
> is not detected by the kernel and so is not available to install the sets.
> I managed to install OpenBSD from http.  You can see on dmesg output that
> no cd0 device is detected.
> 2. On dmesg there are some timeouts on pciide0:0:0:  device
> 3. Also on dmesg, after detecting pci15 at mainbus0 bus 32, there are
> several mem address conflicts
> 
> I don't know if (2) and (3) are related with the panic.
> 
> After getting root prompt I used fw_update to get vmm-bios.
> 
> I created and mounted a partition on /var/vmm to store there all vm images.
> 
> Then I tried start a new vm test machine using the same example as in
> vmctl(8) man page:
> 
> # cd /var/vmm
> # vmctl create disk.img -s 4.5G
> vmctl: imagefile created
> # vmctl start "myvm" -m 1G -i 1 -d disk.img
> vmctl: started vm 1 successfully, tty /dev/ttyp1
> # vmctl status
>ID   PID VCPUS  MAXMEM  CURMEM TTYOWNER NAME
> #
> 
> The machine didn't appear as started so I checked log messages:
> 
> # tail /var/log/messages
> (...) vmd[71615]: myvm: started vm 1 successfully, tty /dev/ttyp1
> (...) vmd[42078]: vcpu_run_loop: vm 1 / vcpu 0 run ioctl failed: Invalid
> argument
> 
> While I was searching for info on this error (not touching the terminal) I
> got a kernel panic:
> 
> Data modified on freelist: word 154145165 of object 0xd4e3b400 size 0x6c
> previous type pcb (invalid addr 0xd4efb280)
> uvm_fault(0xd0ba8a40, 0xd4efb000, 0, 1) -> e
> kernel: page fault trap, code=0
> Stopped at malloc+0x181: movl 0x8(%ebx),%eax
> ddb{0}>
> 

While this may or may not be related to vmm, is there a reason you are using
i386 here? You probably want amd64. Note that vmm on i386 should work but it's
possible something rotted recently. I don't have hardware at the moment to
verify but I can check into it next week.

In the meantime, can you confirm you really want i386 on this machine?

-ml

> 
> This is hardware description from sysctl
> 
> # sysctl hw
> hw.machine=i386
> hw.model=Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz ("GenuineIntel"
> 686-class)
> hw.ncpu=32
> hw.byteorder=1234
> hw.pagesize=4096
> hw.disknames=sd0:49c998d38dc7ac33
> hw.diskcount=1
> hw.sensors.acpitz0.temp0=8.30 degC (zone temperature)
> hw.sensors.cpu0.temp0=37.00 degC
> hw.sensors.ciss0.drive0=online (sd0), OK
> hw.cpuspeed=2594
> hw.setperf=100
> hw.vendor=HP
> hw.product=ProLiant DL360p Gen8
> hw.serialno=CZJ448063M
> hw.uuid=36353430-3831-435a-4a34-34383036334d
> hw.physmem=3184709632
> hw.usermem=3182665728
> hw.ncpufound=32
> hw.allowpowerdown=1
> hw.perfpolicy=manual
> 
> 
> This is the dmesg. Sorry, but is truncated at the start and I don't know
> how to get it complete:
> 
> ,ARAT
> cpu24 at mainbus0: apid 33 (application processor)
> cpu24: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz ("GenuineIntel" 686-class)
> 2.60 GHz
> cpu24:
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,PAGE1GB,LONG,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
> cpu25 at mainbus0: apid 35 (application processor)
> cpu25: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz ("GenuineIntel" 686-class)
> 2.60 GHz
> cpu25:
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,PAGE1GB,LONG,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
> cpu26 at mainbus0: apid 37 (application processor)
> cpu26: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz ("GenuineIntel" 686-class)
> 2.60 GHz
> cpu26:
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,PAGE1GB,LONG,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
> cpu27 at mainbus0: apid 39 (application processor)
> cpu27: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz ("GenuineIntel" 686-class)
> 2.60 GHz
> cpu27:
> 

Re: vmd and FreeBSD support

2017-07-25 Thread Mike Larkin
On Tue, Jul 25, 2017 at 05:12:46PM -0700, Chris Cappuccio wrote:
> Tell it to use a serial console and not a VGA console
> 

There are more bits still missing after that. I posted that I got through
the kernel boot/autoconf, not that "everything works".

Don't burn your time on it yet, but at least one other developer is looking
at it.

-ml

> David Lowe [d.l...@openmailbox.org] wrote:
> > Hello,
> > a few weeks ago, I read something about vmm hosting FreeBSD. I tried the
> > image
> > found at 
> > https://download.freebsd.org/ftp/releases/VM-IMAGES/11.0-RELEASE/amd64/Latest/
> > but the boot process just restarts after this situation:
> > 
> > 
> > 
> >  +Welcome to FreeBSD---+ +o   .--` /y:`  +.
> >  | |  yo`:.:o  `+-
> >  |  1. Boot Multi User [Enter] |   y/   -/`   -o/
> >  |  2. Boot Single User|  .-  ::/sy+:.
> >  |  3. Escape to loader prompt |  / `--  /
> >  |  4. Reboot  | `:  :`
> >  | | `:  :`
> >  |  Options:   |  /  /
> >  |  5. Kernel: default/kernel (1 of 2) |  .--.
> >  |  6. Configure Boot Options...   |   --  -.
> >  | |`:`  `:`
> >  | |  .-- `--.
> >  | | .---..
> >  +-+
> > 
> > 
> > /boot/kernel/kernel text=0x14ed860 data=0x132538+0x4baa68
> > syms=[0x8+0x159ee8+0x8
> > +0x172d9c] 08 di= bp= sp=5df6 cs= ip=9336  f=0242
> > Booting...
> > |reeBSD/x86 bootstrap loader, Revision 1.1
> > (r...@releng2.nyi.freebsd.org, Thu Sep 29 01:38:45 UTC 2016)
> > Loading /boot/defaults/loader.conf
> > /
> > 
> > 
> > Does anyone know a workaround (or some hint how to convince FreeBSD to
> > boot)?
> > I also tried NetBSD but without luck.
> > 
> > Thanks!
> 



Re: vmd: routing problem

2017-07-20 Thread Mike Larkin
On Thu, Jul 20, 2017 at 02:19:29PM +0200, Leo Unglaub wrote:
> Hey,
> 
> On 07/20/17 13:05, Mischa Peters wrote:
> > Can you ask them how they route the separate subnet to you?
> 
> as far as i understand it they route the subnet on my main ip address.
> 
> 
> From there documentation:
> > Newly assigned IPv4 subnets are statically routed on the main IP address of 
> > the server, so no gateway is required.
> 
> I hope that answers your question.
> Thanks and greetings
> Leo


Like I said before, I'm not a networking expert, but what you've said there
doesn't make sense (at least to me). You'll probably need to explain to them
what you are trying to do and have them help you. I don't think this is a vmd
related network issue.

-ml



Re: vmd: routing problem

2017-07-19 Thread Mike Larkin
On Thu, Jul 20, 2017 at 04:23:40AM +0200, Leo Unglaub wrote:
> Hey friends,
> i am trying out vmd and I have a little problem getting networking going
> inside the guest machine. I am not sure if this is a problem in vmd or
> simply my misconfiguration.
> 
> From my datacenter i got the following data:
> 
> Main Server (OpenBSD GENERIC.MP#99 amd64)
> #
> IP: 144.76.102.204
> Netmask: 255.255.255.224
> Gateway: 144.76.102.193
> 
> 
> Virtual Machine (OpenBSD GENERIC.MP#99 amd64)
> #
> I got an entire subnet from the datacenter. 136.243.186.160/29 So i decided
> to use the following IP in it.
> 
> IP: 136.243.186.161
> Netmask: 255.255.255.248
> Gateway: 144.76.102.204
> 
> 
> According to there documentation they always route all subnets on the main
> IP. In my case 144.76.102.204.
> 
> 
> On my host I configured the em0 interface according to the datacenter data
> and it works fine. The host who runs vmd is connected correctly. In my
> /etc/vm.conf i created a switch called "uplink" and added em0 to it. When i
> check the current config via ifconfig i get the following.
> 
> > em0: flags=8b43 
> > mtu 1500
> > lladdr 90:1b:0e:8b:0f:34
> > description: hetzner-uplink
> > index 1 priority 0 llprio 3
> > groups: egress
> > media: Ethernet autoselect (1000baseT full-duplex,rxpause,txpause)
> > status: active
> > inet 144.76.102.204 netmask 0xffe0 broadcast 144.76.102.223
> > 
> > 
> > tap0: flags=8943 mtu 1500
> > lladdr fe:e1:ba:d0:7e:0a
> > description: vm1-if0-foobar
> > index 5 priority 0 llprio 3
> > groups: tap
> > status: active
> > 
> > bridge0: flags=41
> > description: switch1-uplink
> > index 7 llprio 3
> > groups: bridge
> > priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto 
> > rstp
> > em0 flags=3
> > port 1 ifpriority 0 ifcost 0
> > tap0 flags=3
> > port 5 ifpriority 0 ifcost 0
> > Addresses (max cache: 100, timeout: 240):
> > 0c:86:10:ed:35:58 em0 1 flags=0<>
> 
> My /etc/vm.conf looks like this:
> 
> > switch "uplink" {
> > add em0
> > }
> > 
> > vm "foobar" {
> > memory 2G
> > disk "/tmp/1.vdi"
> > interface {
> > switch "uplink"
> > }
> > }
> 
> When i start the vm with my current /bsd.rd i start the installer and insert
> the following:
> 
> > Available network interfaces are: vio0 vlan0.
> > Which network interface do you wish to configure? (or 'done') [vio0]
> > IPv4 address for vio0? (or 'dhcp' or 'none') [dhcp] 136.243.186.161
> > Netmask for vio0? [255.255.255.248] IPv6 address for vio0? (or
> > 'autoconf' or 'none') [none] Available network interfaces are: vio0
> > vlan0.
> > Which network interface do you wish to configure? (or 'done') [done]
> > Default IPv4 route? (IPv4 address or none) 144.76.102.204
> > add net default: gateway 144.76.102.204: Network is unreachable
> 
> Can you people see something that i might missed?
> Big thanks in advance and greetings
> Leo
> 
> 

sysctl net.inet.ip.forwarding=1 ?

I'm not a networking expert but I think your VM's subnet mask is wrong for
the gateway you are trying to use.

-ml



Re: Problems installing on Dell R830

2017-04-26 Thread Mike Larkin
On Wed, Apr 26, 2017 at 03:55:34PM +1000, adr...@close.wattle.id.au wrote:
> Hi all,
> 
> It's been a long time since I posted here, so apologies if I slip up on the 
> netiquette.
> 
> I'm trying to install on a Dell R830 but I can't get the installer to boot - 
> it crashes with a page fault after displaying the initial copyright message:
> 
> [..snip..]
> fatal page fault in supervisor mode
> trap type 6 code 2 rip 8100195d cs 8 rflags 10246 cr2  f807ffef000
> cpl e rsp 81a05ba8
> panic: trap type 6, code=2, pc=8100195d
> [..snip..]
> 
> I've tried booting 6.0, 6.1 and the current snapshot with similar results.  
> Other Dell hardware I have access to (eg. R630, R620) works OK.  Normally I'd 
> try disabling stuff in UKC, but booting with "-c" has the same result and no 
> UKC> prompt.
> 
> Does anyone have any suggestions on how I might get this going?
> 
> Thanks,
> 
> Adrian Close
> 
> 

how much memory does the machine have?



Re: Arch and vmd

2017-04-26 Thread Mike Larkin
On Wed, Apr 26, 2017 at 06:47:17PM +0200, Karl Pettersson wrote:
> Arch Linux works well as a vmd guest. Some notes about my experiences 
> installing the system:
> 
> * The Arch installation can be started from the serial console, see:
>   https://wiki.archlinux.org/index.php/Working_with_the_serial_console
>   #Installing_Arch_Linux_using_the_serial_console
>   However, the installation still tends to be unstable, due to unreliable
>   downloads (which has been discussed earlier). Until this is fixed, the 
>   installation can be run in QEMU, or in a guest under Linux/KVM (as is
>   currently required by distributions with graphical install).
> 
> * Syslinux has to be used as bootloader, and serial console should be
>   enabled: https://wiki.archlinux.org/index.php/Syslinux#Serial_console
>   Moreover, the generated config has to be edited to point to the
>   correct root device, and if Ext4 is used as root file system, it must
>   not be 64bit (which is enabled by default when the file system is
>   created): http://www.syslinux.org/wiki/index.php?title=Filesystem
> 

Thanks for trying this out and reporting Karl.

The notes about serial console are welcome. Do note that we are working toward
an sgabios + seabios payload so that you will be able to install from media
that uses the regular VGA console (sgabios redirects VGA text mode I/O to
the serial console). There are a couple of developers working on this, hopefully
it will make it to the tree soon.

-ml



Re: Problems installing on Dell R830

2017-04-26 Thread Mike Larkin
On Thu, Apr 27, 2017 at 09:08:18AM +1000, adr...@close.wattle.id.au wrote:
> Hi Mike,
> 
> Thanks for your reply.
> 
> > how much memory does the machine have?
> 
> This Dell R830 has 512GB of RAM (which is the definitely the biggest machine 
> I've ever tried to install OpenBSD on).  There is a decent delay between the 
> copyright message and the page fault.
> 
> It's destined to go into production as a Linux-based hypervisor (sorry), but 
> I've got some time with it before that needs to happen so I thought I'd try 
> to spin up OpenBSD on it.
> 
> Thanks,
> 
> Adrian Close
> 

Your crash pointed to something in pagezero, and the faulting address
was something really odd.

Can you show the output of "mach mem" from boot>   ?

512GB is the limit for physmem in OpenBSD amd64 (I believe, last time I looked,
unless someone upped it). It's possible the bios remapped some memory past
512GB and we got confused.

-ml



Re: Problems installing on Dell R830

2017-04-26 Thread Mike Larkin
On Thu, Apr 27, 2017 at 09:33:39AM +1000, adr...@close.wattle.id.au wrote:
> Hi Mike,
> 
> On Thu, Apr 27, 2017 at 09:08:18AM +1000, adr...@close.wattle.id.au wrote:
> 
> > Can you show the output of "mach mem" from boot>   ?
> 
> It faults before it displays the "boot>" prompt, so that's tricky.
> Is the result of that still useful if I pull some memory out?
> 
> >512GB is the limit for physmem in OpenBSD amd64 (I believe, last time I 
> >looked,
> unless someone upped it). It's possible the bios remapped some memory past
> 512GB and we got confused.
> 
> I'll see if I can find anything obvious in the BIOS settings along those 
> lines.
> 
> Thanks,
> 
> Adrian Close
> 

huh? I thought you said it fails after displaying the copyright message.

boot> is shown long before that.



Re: Problems installing on Dell R830

2017-04-26 Thread Mike Larkin
On Thu, Apr 27, 2017 at 10:20:38AM +1000, adr...@close.wattle.id.au wrote:
> Hi Mike,
> 
> > huh? I thought you said it fails after displaying the copyright message.
> > boot> is shown long before that.
> 
> Sorry, not enough coffee.
> 
> [..snip..]
> >> OpenBSD/amd64 CDBOOT 3.28
> boot> mach mem
> Region 0: type 1 at 0x0 for 624KB
> Region 1: type 2 at 0x9c000 for 16KB
> Region 2: type 3 at 0xe for 128KB
> Region 3: type 1 at 0x100 for 1823020KB
> Region 4: type 2 at 0x6f54b000 for 6148KB
> Region 5: type 1 at 0x6fb4c000 for 171252KB
> Region 6: type 2 at 0x7a289000 for 12808KB
> Region 7: type 4 at 0x7af0b000 for 10432KB
> Region 8: type 3 at 0x7b93b000 for 1500KB
> Region 9: type 1 at 0x7bab2000 for 220KB
> Region 10: type 3 at 0x7bae9000 for 88KB
> Region 11: type 1 at 0x7baff000 for 4KB
> Region 12: type 2 at 0x7bb0 for 5120KB
> Region 13: type 2 at 0x7c00 for 61440KB
> Region 14: type 2 at 0x7fc0 for 4096KB
> Region 15: type 2 at 0x8000 for 262144KB
> Region 16: type 2 at 0cfeda8000 for 16KB
> Region 17: type 2 at 0xff31 for 13248KB
> Region 18: type 1 at 0x1 for 534773760KB
> Low ram: 624KB  High ram: 1823020KB
> Total free memory: 536768880KB
> [..snip..]
> 
> ... with apologies for any typos as I copied that manually from the screen.
> 
> Thanks.
> 
> Adrian Close
> 

try removing some RAM, at least that will tell us if this is the issue or
if it is something else.

-ml



Re: [vmm] SSL read error: read failed: error:06FFF064:digital envelope routines:CRYPTO_internal:bad decrypt

2017-04-27 Thread Mike Larkin
On Sun, Apr 16, 2017 at 09:17:44AM +, Paul Chakravarti wrote:
> Hello,
> 
> I am trying out vmm on 6.1 and can setup/boot vm etc. however when I try to
> download a large file using SSL I consistenetly get the following error:
> 
> > SSL read error: read failed: error:06FFF064:digital envelope
> routines:CRYPTO_internal:bad decrypt
> 
> This occasionally (but not always) correlates with the following message in
> the vmd log:
> 
> > vionet queue notify - no space, dropping packet
> 
> Strangely non-SSL and smaller SSL downloads seem to work ok (see below).
> 
> Originally spotted this using installer but can recreate from shell.
> 
> Any ideas?
> 

The diff I just committed should fix this as well as the previously reported
github clone issue. The diff is also already in snaps (as of this morning).

Please update and let me know if you still see this problem.

Thanks for reporting this.

-ml

> # cat /etc/vm.conf                                                           
>                                                        
> vm vm0 {
>   disable
>   memory 512M
>   disk /home/vm/vm0.img
>   kernel /bsd.rd
>   interface { switch uplink }
> }
> 
> switch uplink {
>   interface bridge0
>   add vether0
> }
> 
> # vmctl start vm0 
> vmctl: started vm 11 successfully, tty /dev/ttyp6
> # vmctl status
>ID   PID VCPUS  MAXMEM  CURMEM TTYOWNER NAME
>11 85026 1512M   97.3M   ttyp6 root vm0
> # cu -l /dev/ttyp6
> Connected to /dev/ttyp6 (speed 9600)
> 
> (I)nstall, (U)pgrade, (A)utoinstall or (S)hell? s
> # dhclient vio0                                                             
>  
> DHCPDISCOVER on vio0 - interval 1
> DHCPOFFER from 10.0.0.1 (fe:e1:ba:d3:55:34)
> DHCPREQUEST on vio0 to 255.255.255.255
> DHCPACK from 10.0.0.1 (fe:e1:ba:d3:55:34)
> bound to 10.0.0.105 -- renewal in 21600 seconds.
> #
> # ftp -Vo- http://www.mirrorservice.org/pub/OpenBSD/6.1/amd64/bsd | sha256
> 440311305f27f0efcfcc88116299a21cb3f890fb91ee611c2a79cc9163e8fceb
> # ftp -Vo- http://www.mirrorservice.org/pub/OpenBSD/6.1/amd64/SHA256 | fgrep
> '(bsd)'
> SHA256 (bsd) =
> 440311305f27f0efcfcc88116299a21cb3f890fb91ee611c2a79cc9163e8fceb
> # ftp -Vo- http://www.mirrorservice.org/pub/OpenBSD/6.1/amd64/base61.tgz |
> sha256 
> 5c467ea369b5632d3b057283857d1998fb3dcd26179365291f16c70785a65282
> # ftp -Vo- http://www.mirrorservice.org/pub/OpenBSD/6.1/amd64/SHA256 | fgrep
> '(base61.tgz)'
> SHA256 (base61.tgz) =
> 5c467ea369b5632d3b057283857d1998fb3dcd26179365291f16c70785a65282
> #
> # ftp -Vo- https://www.mirrorservice.org/pub/OpenBSD/6.1/amd64/bsd | sha256
> ftp: SSL read error: read failed: error:06FFF064:digital envelope
> routines:CRYPTO_internal:bad decrypt
> 27ad92f2aaf0279dd125ed54d0b7fbf330a3ecbe2e919b4d2d0ed1d07dccc087
> # ftp -Vo- https://www.mirrorservice.org/pub/OpenBSD/6.1/amd64/base61.tgz |
> sha256
> ftp: SSL read error: read failed: error:06FFF064:digital envelope
> routines:CRYPTO_internal:bad decrypt
> d79f6fd884a839d1fc62dc1b5d40de21f97fd5a50b28319a7b25dd8cd82da887
> 
> [On host]
> 
> # top -d1 all
> load averages:  1.14,  1.16,  1.16x230 10:06:31
> 68 processes: 67 idle, 1 on processor  up 2 days, 11:19
> CPU0 states:  0.2% user,  0.0% nice,  0.5% system,  0.2% interrupt, 99.1%
> idle
> CPU1 states:  4.6% user,  0.0% nice,  8.3% system,  0.0% interrupt, 87.2%
> idle
> CPU2 states:  1.2% user,  0.0% nice,  2.2% system,  0.0% interrupt, 96.6%
> idle
> CPU3 states:  0.8% user,  0.0% nice,  1.1% system,  0.0% interrupt, 98.1%
> idle
> Memory: Real: 470M/1376M act/tot Free: 6261M Cache: 652M Swap: 0K/3562M
> 
>   PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU COMMAND
> 85026 _vmd  280  514M   14M idle  thrslee   1:19 13.53% vmd
> 55104 paulc  20  399M  301M sleep/3   poll  4:09  7.86% firefox
>  1136 paulc  20 1180K 9156K sleep/3   poll  0:23  0.05% i3bar
> 91148 paulc  20   14M   50M sleep/2   select0:24  0.00% Xorg
> 48836 paulc 100  752K 1988K sleep/2   nanosle   0:05  0.00% i3status
> 24227 paulc  20 1032K 2820K sleep/2   select0:04  0.00% sshd
> 66378 paulc  20 1564K   10M idle  poll  0:02  0.00% i3
> 67867 paulc  20 5032K   13M idle  select0:02  0.00% urxvt
> 22018 _syslogd   20  904K 1544K sleep/2   kqread0:02  0.00% syslogd
> 1 root  100  380K  416K idle  wait  0:01  0.00% init
> 43749 _pflogd40  668K  428K sleep/1   bpf   0:01  0.00% pflogd
> 27702 _ntp   2  -20  888K 2344K sleep/2   poll  0:01  0.00% ntpd
> 49491 paulc  20 4972K   13M idle  select0:01  0.00% urxvt
> 76489 _vmd   20 1176K 1672K idle  kqread0:00  0.00% vmd
>  6009 root   20  620K  528K idle  poll  0:00  0.00% dhclient
> 39926 paulc  20 4912K   12M idle  select0:00  0.00% urxvt
>  3807 paulc 180  604K  732K idle  pause 0:00  0.00% ksh
> 76917 root   20  220K  

Re: Ubuntu in vmd and avx

2017-04-24 Thread Mike Larkin
On Mon, Apr 24, 2017 at 11:50:07AM -0700, Mike Larkin wrote:
> On Mon, Apr 24, 2017 at 08:18:17PM +0200, Karl Pettersson wrote:
> > I run 64-bit Ubuntu as a vmm guest, according to:
> > https://gist.github.com/reyk/6d369c5c0bd0c76f4906f83933f3bb71
> > 
> > It works well for the most part; I have removed cloud-init becaue I do
> > not need it. However, I used Python 2.7 with numpy 1.12 (installed via Pip),
> > and experienced crashes which seemed to be related to AVX2
> > instructions, even though the cpu should support this, according to
> > /proc/cpuinfo. (cf. https://github.com/numpy/numpy/issues/8128). For
> > example, when I tried to reproduce this simple chart,
> > https://matplotlib.org/examples/lines_bars_and_markers/fill_demo.html,
> > this made Python exit with illegal instruction, according to gdb:
> > 
> > Program received signal SIGILL, Illegal instruction.  0x73ce5d56
> > in UBYTE_less_equal_avx2 (args=0x7fffba50, dimensions= > out>, steps=, __NPY_UNUSED_TAGGEDfunc=) at
> > numpy/core/src/umath/loops.c.src:899
> > 
> > Downgrading to numpy 1.11.1~rc1 (the version available from as an Ubuntu
> > package) seems to have fixed the issue.
> >
> 
> we filter out avx2 from the guest, for now.  
> 

actually after looking at this it appears we don't, and we should. the filter
mask is only for avx (and not the later ones). I'll add suppression of avx2,
that may force your software to downgrade to something we do allow. I'll commit
that tonight.



<    1   2   3   4   5   6   >