amd64.iso KVM guest kernel panic pc=ffffffff811c303c (Opteron_G3 to Opteron_G5)

2018-10-21 Thread snikolov
Hello All,

During install of install64.iso I experience a kernel panic during
boot of the CD (pc=811c303c).
install64.iso sha256sum is
81833b79e23dc0f961ac5fb34484bca66386deb3181ddb8236870fa4f488cdd2 which
matches https://cdn.openbsd.org/pub/OpenBSD/6.4/amd64/SHA256

I have tested with various CPUs on my RHEL 7.5 and it seems that
Opteron_G3/G4/G5 and FX-8350 (host-passthrough) causes the panic,while
Opteron_G1/G2 is OK. Booting install63.iso on the same VM is OK and I
got the installer prompt.

Does anyone observes the same behaviour or it is only me ?

Best Regards,
Strahil Nikolov


Re: amd64.iso KVM guest kernel panic pc=ffffffff811c303c (Opteron_G3 to Opteron_G5)

2018-10-21 Thread snikolov
Dear All,

I have managed to configure and get the output of the serial console on
KVM and here is the output (with different CPU type only the name of
the CPU changes) :
~~
>> OpenBSD/amd64 CDBOOT 3.40
boot> 
cannot open cd0a:/etc/random.seed: No such file or directory
booting cd0a:/6.4/amd64/bsd.rd: 354+1500160+3892040+0+598016
[372715+111+441072+293323]=0xa208a0
entry point at 0x1000158
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights
reserved.
Copyright (c) 1995-2018 OpenBSD. All rights reserved.  https://www.Open
BSD.org

OpenBSD 6.4 (RAMDISK_CD) #348: Thu Oct 11 13:36:16 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_C
D
real mem = 4278030336 (4079MB)
avail mem = 4144590848 (3952MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf6110 (11 entries)
bios0: vendor SeaBIOS version "1.11.0-2.el7" 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: AMD Opteron 63xx class CPU, 3992.09 MHz, 15-02-00
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36
,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,PCLMUL,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,x2A
PIC,POPCNT,AES,XSAVE,AVX,F16C,HV,NXE,PAGE1GB,LONG,LAHF,ABM,SSE4A,MASSE,
3DNOWP,XOP,FMA4,TBM
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
64b/line 16-way L2 cache, 16MB 64b/line 16-way L3 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
fatal protection fault in supervisor mode
trap type 4 code 0 rip 811c303c cs 8 rflags 10202 cr2  0 cpl e
rsp 81a06a20
gsbase 0x81872ff0  kgsbase 0x0
panic: trap type 4, code=0, pc=811c303c

The operating system has halted.
Please press any key to reboot.
~~

Should I report this as a bug ?

Best Regards,
Strahil Nikolov


On Sun, 2018-10-21 at 18:07 +0300, snikolov wrote:
> Hello All,
> 
> During install of install64.iso I experience a kernel panic during
> boot of the CD (pc=811c303c).
> install64.iso sha256sum is
> 81833b79e23dc0f961ac5fb34484bca66386deb3181ddb8236870fa4f488cdd2
> which
> matches https://cdn.openbsd.org/pub/OpenBSD/6.4/amd64/SHA256
> 
> I have tested with various CPUs on my RHEL 7.5 and it seems that
> Opteron_G3/G4/G5 and FX-8350 (host-passthrough) causes the
> panic,while
> Opteron_G1/G2 is OK. Booting install63.iso on the same VM is OK and I
> got the installer prompt.
> 
> Does anyone observes the same behaviour or it is only me ?
> 
> Best Regards,
> Strahil Nikolov



Re: amd64.iso KVM guest kernel panic pc=ffffffff811c303c (Opteron_G3 to Opteron_G5)

2018-10-22 Thread Mike Larkin
On Mon, Oct 22, 2018 at 07:09:21AM +0300, snikolov wrote:
> Dear All,
> 
> I have managed to configure and get the output of the serial console on
> KVM and here is the output (with different CPU type only the name of
> the CPU changes) :
> ~~
> >> OpenBSD/amd64 CDBOOT 3.40
> boot> 
> cannot open cd0a:/etc/random.seed: No such file or directory
> booting cd0a:/6.4/amd64/bsd.rd: 354+1500160+3892040+0+598016
> [372715+111+441072+293323]=0xa208a0
> entry point at 0x1000158
> Copyright (c) 1982, 1986, 1989, 1991, 1993
>   The Regents of the University of California.  All rights
> reserved.
> Copyright (c) 1995-2018 OpenBSD. All rights reserved.  https://www.Open
> BSD.org
> 
> OpenBSD 6.4 (RAMDISK_CD) #348: Thu Oct 11 13:36:16 MDT 2018
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_C
> D
> real mem = 4278030336 (4079MB)
> avail mem = 4144590848 (3952MB)
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf6110 (11 entries)
> bios0: vendor SeaBIOS version "1.11.0-2.el7" 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: AMD Opteron 63xx class CPU, 3992.09 MHz, 15-02-00
> cpu0:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36
> ,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,PCLMUL,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,x2A
> PIC,POPCNT,AES,XSAVE,AVX,F16C,HV,NXE,PAGE1GB,LONG,LAHF,ABM,SSE4A,MASSE,
> 3DNOWP,XOP,FMA4,TBM
> cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
> 64b/line 16-way L2 cache, 16MB 64b/line 16-way L3 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
> fatal protection fault in supervisor mode
> trap type 4 code 0 rip 811c303c cs 8 rflags 10202 cr2  0 cpl e
> rsp 81a06a20
> gsbase 0x81872ff0  kgsbase 0x0
> panic: trap type 4, code=0, pc=811c303c
> 
> The operating system has halted.
> Please press any key to reboot.
> ~~
> 
> Should I report this as a bug ?
> 
> Best Regards,
> Strahil Nikolov
> 
> 
> On Sun, 2018-10-21 at 18:07 +0300, snikolov wrote:
> > Hello All,
> > 
> > During install of install64.iso I experience a kernel panic during
> > boot of the CD (pc=811c303c).
> > install64.iso sha256sum is
> > 81833b79e23dc0f961ac5fb34484bca66386deb3181ddb8236870fa4f488cdd2
> > which
> > matches https://cdn.openbsd.org/pub/OpenBSD/6.4/amd64/SHA256
> > 
> > I have tested with various CPUs on my RHEL 7.5 and it seems that
> > Opteron_G3/G4/G5 and FX-8350 (host-passthrough) causes the
> > panic,while
> > Opteron_G1/G2 is OK. Booting install63.iso on the same VM is OK and I
> > got the installer prompt.
> > 
> > Does anyone observes the same behaviour or it is only me ?
> > 
> > Best Regards,
> > Strahil Nikolov
> 

This appears to be related to the LFENCE serializing MSR change that went in
during the last round of side channel analysis fixes:

811c3037:   b9 29 10 01 c0  mov$0xc0011029,%ecx
811c303c:   0f 32   rdmsr

According to the commit, "This MSR is available on all AMD families >= 10h...",
and since yours is family 15h, it should work. Maybe that assumption was wrong?

-ml



Re: amd64.iso KVM guest kernel panic pc=ffffffff811c303c (Opteron_G3 to Opteron_G5)

2018-10-22 Thread snikolov
> This appears to be related to the LFENCE serializing MSR change that
> went in
> during the last round of side channel analysis fixes:
> 
> 811c3037:   b9 29 10 01
> c0  mov$0xc0011029,%ecx
> 811c303c:   0f 32   rdmsr
> 
> According to the commit, "This MSR is available on all AMD families
> >= 10h...",
> and since yours is family 15h, it should work. Maybe that assumption
> was wrong?
> 
> -ml
> 
The Host's CPU is FX-8350 ,so you assumed right. Yet, I am new to
openBSD so I have no clue what approach to be taken.

Strahil



Re: amd64.iso KVM guest kernel panic pc=ffffffff811c303c (Opteron_G3 to Opteron_G5)

2018-10-22 Thread Bryan Steele
On Mon, Oct 22, 2018 at 09:49:54AM -0700, Mike Larkin wrote:
> On Mon, Oct 22, 2018 at 07:09:21AM +0300, snikolov wrote:
> > Dear All,
> > 
> > I have managed to configure and get the output of the serial console on
> > KVM and here is the output (with different CPU type only the name of
> > the CPU changes) :
> > ~~
> > >> OpenBSD/amd64 CDBOOT 3.40
> > boot> 
> > cannot open cd0a:/etc/random.seed: No such file or directory
> > booting cd0a:/6.4/amd64/bsd.rd: 354+1500160+3892040+0+598016
> > [372715+111+441072+293323]=0xa208a0
> > entry point at 0x1000158
> > Copyright (c) 1982, 1986, 1989, 1991, 1993
> > The Regents of the University of California.  All rights
> > reserved.
> > Copyright (c) 1995-2018 OpenBSD. All rights reserved.  https://www.Open
> > BSD.org
> > 
> > OpenBSD 6.4 (RAMDISK_CD) #348: Thu Oct 11 13:36:16 MDT 2018
> > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_C
> > D
> > real mem = 4278030336 (4079MB)
> > avail mem = 4144590848 (3952MB)
> > mainbus0 at root
> > bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf6110 (11 entries)
> > bios0: vendor SeaBIOS version "1.11.0-2.el7" 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: AMD Opteron 63xx class CPU, 3992.09 MHz, 15-02-00
> > cpu0:
> > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36
> > ,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,PCLMUL,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,x2A
> > PIC,POPCNT,AES,XSAVE,AVX,F16C,HV,NXE,PAGE1GB,LONG,LAHF,ABM,SSE4A,MASSE,
> > 3DNOWP,XOP,FMA4,TBM
> > cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
> > 64b/line 16-way L2 cache, 16MB 64b/line 16-way L3 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
> > fatal protection fault in supervisor mode
> > trap type 4 code 0 rip 811c303c cs 8 rflags 10202 cr2  0 cpl e
> > rsp 81a06a20
> > gsbase 0x81872ff0  kgsbase 0x0
> > panic: trap type 4, code=0, pc=811c303c
> > 
> > The operating system has halted.
> > Please press any key to reboot.
> > ~~
> > 
> > Should I report this as a bug ?
> > 
> > Best Regards,
> > Strahil Nikolov
> > 
> > 
> > On Sun, 2018-10-21 at 18:07 +0300, snikolov wrote:
> > > Hello All,
> > > 
> > > During install of install64.iso I experience a kernel panic during
> > > boot of the CD (pc=811c303c).
> > > install64.iso sha256sum is
> > > 81833b79e23dc0f961ac5fb34484bca66386deb3181ddb8236870fa4f488cdd2
> > > which
> > > matches https://cdn.openbsd.org/pub/OpenBSD/6.4/amd64/SHA256
> > > 
> > > I have tested with various CPUs on my RHEL 7.5 and it seems that
> > > Opteron_G3/G4/G5 and FX-8350 (host-passthrough) causes the
> > > panic,while
> > > Opteron_G1/G2 is OK. Booting install63.iso on the same VM is OK and I
> > > got the installer prompt.
> > > 
> > > Does anyone observes the same behaviour or it is only me ?
> > > 
> > > Best Regards,
> > > Strahil Nikolov
> > 
> 
> This appears to be related to the LFENCE serializing MSR change that went in
> during the last round of side channel analysis fixes:
> 
> 811c3037:   b9 29 10 01 c0  mov$0xc0011029,%ecx
> 811c303c:   0f 32   rdmsr
> 
> According to the commit, "This MSR is available on all AMD families >= 
> 10h...",
> and since yours is family 15h, it should work. Maybe that assumption was 
> wrong?
> 
> -ml

This appears to be another case of an outdated host kernel / KVM
combination. If you tried to boot OpenBSD on the bare hardware,
it wouldn't panic.

We're following AMD's recommendation here, as far as can tell.

https://marc.info/?l=openbsd-misc&m=153315801921789&w=2

-Bryan.



Re: amd64.iso KVM guest kernel panic pc=ffffffff811c303c (Opteron_G3 to Opteron_G5)

2018-10-22 Thread Mike Larkin
On Mon, Oct 22, 2018 at 08:01:13PM +0300, snikolov wrote:
> > This appears to be related to the LFENCE serializing MSR change that
> > went in
> > during the last round of side channel analysis fixes:
> > 
> > 811c3037:   b9 29 10 01
> > c0  mov$0xc0011029,%ecx
> > 811c303c:   0f 32   rdmsr
> > 
> > According to the commit, "This MSR is available on all AMD families
> > >= 10h...",
> > and since yours is family 15h, it should work. Maybe that assumption
> > was wrong?
> > 
> > -ml
> > 
> The Host's CPU is FX-8350 ,so you assumed right. Yet, I am new to
> openBSD so I have no clue what approach to be taken.
> 
> Strahil

Maybe a BIOS update is available? The date on yours is 2014. Maybe they
added that MSR after?



Re: amd64.iso KVM guest kernel panic pc=ffffffff811c303c (Opteron_G3 to Opteron_G5)

2018-10-22 Thread Mike Larkin
On Mon, Oct 22, 2018 at 10:13:14AM -0700, Mike Larkin wrote:
> On Mon, Oct 22, 2018 at 08:01:13PM +0300, snikolov wrote:
> > > This appears to be related to the LFENCE serializing MSR change that
> > > went in
> > > during the last round of side channel analysis fixes:
> > > 
> > > 811c3037:   b9 29 10 01
> > > c0  mov$0xc0011029,%ecx
> > > 811c303c:   0f 32   rdmsr
> > > 
> > > According to the commit, "This MSR is available on all AMD families
> > > >= 10h...",
> > > and since yours is family 15h, it should work. Maybe that assumption
> > > was wrong?
> > > 
> > > -ml
> > > 
> > The Host's CPU is FX-8350 ,so you assumed right. Yet, I am new to
> > openBSD so I have no clue what approach to be taken.
> > 
> > Strahil
> 
> Maybe a BIOS update is available? The date on yours is 2014. Maybe they
> added that MSR after?
> 

As brynet@ pointed out in a later reply, BIOS update probably won't help.

-ml



Re: amd64.iso KVM guest kernel panic pc=ffffffff811c303c (Opteron_G3 to Opteron_G5)

2018-10-22 Thread snikolov
On Mon, 2018-10-22 at 10:27 -0700, Mike Larkin wrote:
> On Mon, Oct 22, 2018 at 10:13:14AM -0700, Mike Larkin wrote:
> > On Mon, Oct 22, 2018 at 08:01:13PM +0300, snikolov wrote:
> > > > This appears to be related to the LFENCE serializing MSR change
> > > > that
> > > > went in
> > > > during the last round of side channel analysis fixes:
> > > > 
> > > > 811c3037:   b9 29 10 01
> > > > c0  mov$0xc0011029,%ecx
> > > > 811c303c:   0f 32   rdmsr
> > > > 
> > > > According to the commit, "This MSR is available on all AMD
> > > > families
> > > > > = 10h...",
> > > > 
> > > > and since yours is family 15h, it should work. Maybe that
> > > > assumption
> > > > was wrong?
> > > > 
> > > > -ml
> > > > 
> > > 
> > > The Host's CPU is FX-8350 ,so you assumed right. Yet, I am new to
> > > openBSD so I have no clue what approach to be taken.
> > > 
> > > Strahil
> > 
> > Maybe a BIOS update is available? The date on yours is 2014. Maybe
> > they
> > added that MSR after?
> > 
> 
> As brynet@ pointed out in a later reply, BIOS update probably won't
> help.
> 
> -ml
> 

BIOS update is unavailable, yet the microcode patch_level is
'0x06000852'. The kernel is: 3.10.0-862.3.3.el7.x86_64

Any kernel parameters to disable the mitigations and still leave the
CPU at Opteron_G5 ?

Strahil



Re: amd64.iso KVM guest kernel panic pc=ffffffff811c303c (Opteron_G3 to Opteron_G5)

2018-10-22 Thread Mike Larkin
On Mon, Oct 22, 2018 at 08:59:46PM +0300, snikolov wrote:
> On Mon, 2018-10-22 at 10:27 -0700, Mike Larkin wrote:
> > On Mon, Oct 22, 2018 at 10:13:14AM -0700, Mike Larkin wrote:
> > > On Mon, Oct 22, 2018 at 08:01:13PM +0300, snikolov wrote:
> > > > > This appears to be related to the LFENCE serializing MSR change
> > > > > that
> > > > > went in
> > > > > during the last round of side channel analysis fixes:
> > > > > 
> > > > > 811c3037:   b9 29 10 01
> > > > > c0  mov$0xc0011029,%ecx
> > > > > 811c303c:   0f 32   rdmsr
> > > > > 
> > > > > According to the commit, "This MSR is available on all AMD
> > > > > families
> > > > > > = 10h...",
> > > > > 
> > > > > and since yours is family 15h, it should work. Maybe that
> > > > > assumption
> > > > > was wrong?
> > > > > 
> > > > > -ml
> > > > > 
> > > > 
> > > > The Host's CPU is FX-8350 ,so you assumed right. Yet, I am new to
> > > > openBSD so I have no clue what approach to be taken.
> > > > 
> > > > Strahil
> > > 
> > > Maybe a BIOS update is available? The date on yours is 2014. Maybe
> > > they
> > > added that MSR after?
> > > 
> > 
> > As brynet@ pointed out in a later reply, BIOS update probably won't
> > help.
> > 
> > -ml
> > 
> 
> BIOS update is unavailable, yet the microcode patch_level is
> '0x06000852'. The kernel is: 3.10.0-862.3.3.el7.x86_64
> 
> Any kernel parameters to disable the mitigations and still leave the
> CPU at Opteron_G5 ?
> 
> Strahil
> 

Not from the OpenBSD side.

-ml