On Sat, Mar 12, 2016 at 01:49:08PM +0100, Hiltjo Posthuma wrote:
> >Synopsis:    crash with performance counter (RDPMC) on OpenBSD as QEMU quest 
> >VM
> >Category:    Crash / system hang
> >Environment:
>       System      : OpenBSD 5.8 and -current (snapshot: 2016-03-11)
>       Details     : OpenBSD 5.8 (GENERIC) #0: Fri Oct 23 11:15:05 CEST 2015
>                        
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC
> 
>       Architecture: OpenBSD.amd64
>       Machine     : amd64
> >Description:
>       I run OpenBSD on my VPS as a QEMU quest VM, when I run `pctr` as a user
>       the system hangs and shows the ddb console.
> >How-To-Repeat:
>       run as user in QEMU VM the command: pctr
> >Fix:
>       I don't know the correct fix for this issue, below is a workaround
> and additional information:
> 
>       trace from ddb console:
> 
>               kernel: protection fault trap, code=0
>               Stopped at      pctrioctl+0x140:        rdpmc
>               ddb> trace
>               pctrioctl() at pctrioctl+0x140
>               VOP_IOCTL() at VOP_IOCTL+0x44
>               vn_ioctl() at vn_ioctl+0x77
>               sys_ioctl() at sys_ioctl+0x18b
>               syscall() at syscall+0x19e
>               --- syscall (number 54) ---
>               end of kernel
>               end trace frame: 0x3, count: -5
> 

I looked through the pctr code and it appears that we are only querying
counters 0 and 1, which appear to be valid counters on all supported CPUs.
(At least for Intel, which is what your qemu instance reports)

Can you repeat this crash and do a "show registers" after it breaks into
DDB? I'm interested in ECX/RCX content.

Possible related issue: http://www.spinics.net/lists/kvm/msg128775.html

-ml

Reply via email to