amd64/175780: Crash on KVM boot due to xsave instruction issue

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

amd64/175780: Crash on KVM boot due to xsave instruction issue

Kaloyan Ganchev

>Number:         175780
>Category:       amd64
>Synopsis:       Crash on KVM boot due to xsave instruction issue
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-amd64
>State:          open
>Quarter:        
>Keywords:      
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 02 13:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Kaloyan Ganchev
>Release:        9.1
>Organization:
>Environment:
>Description:
When trying to boot FreeBSD 9.1 on kvm host  with the following command:

kvm -cpu core2duo,+xsave -enable-kvm -drive file=freebsd-9.1-qcow2.img -boot d -net nic -net user -nographic -vnc :0  -cdrom ./isos/FreeBSD-9.1-RELEASE-amd64-disc1.iso

The kernel return the following error immediately after taking over from the loader:

panic: CPU0 does not support X87 or SSE : 0

If I do not expose the xsave cpu flag to the FreeBSD guest the virtual machine boot as expected.
This problem do not appear in 9.1 i386 and 9.0 amd64 releases.
Also I tried several other cpu models instead of the core2duo and it doesn't make a difference, if xsave is exposed to the guest, FreeBSD 9.1 amd64 fails to boot with the error above.
>How-To-Repeat:
kvm -cpu core2duo,+xsave -enable-kvm -drive file=freebsd-9.1-qcow2.img -boot d -net nic -net user -nographic -vnc :0  -cdrom ./isos/FreeBSD-9.1-RELEASE-amd64-disc1.iso
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: amd64/175780: Crash on KVM boot due to xsave instruction issue

Konstantin Belousov
On Sat, Feb 02, 2013 at 01:04:14PM +0000, Kaloyan Ganchev wrote:

> When trying to boot FreeBSD 9.1 on kvm host  with the following command:
>
> kvm -cpu core2duo,+xsave -enable-kvm -drive file=freebsd-9.1-qcow2.img -boot d -net nic -net user -nographic -vnc :0  -cdrom ./isos/FreeBSD-9.1-RELEASE-amd64-disc1.iso
>
> The kernel return the following error immediately after taking over from the loader:
>
> panic: CPU0 does not support X87 or SSE : 0
>
> If I do not expose the xsave cpu flag to the FreeBSD guest the virtual machine boot as expected.
> This problem do not appear in 9.1 i386 and 9.0 amd64 releases.
This is a misconfigured hypervisor, or a bug in the hypervisor.

FreeBSD amd64 assumes that both X87 FPU and SSE2 are present for any
CPU capable of long mode. It is enforced by the Unix amd64 ABI.

Intel documentation states that CPUID leaf 0xd must report the presence of
FPU extensions, and since for the long mode capable CPU, SSE2 and X87 must
be present, we re-check the report. Aparently, the returned CPUID data
is wrong.

> Also I tried several other cpu models instead of the core2duo and it doesn't make a difference, if xsave is exposed to the guest, FreeBSD 9.1 amd64 fails to boot with the error above.
> >How-To-Repeat:
> kvm -cpu core2duo,+xsave -enable-kvm -drive file=freebsd-9.1-qcow2.img -boot d -net nic -net user -nographic -vnc :0  -cdrom ./isos/FreeBSD-9.1-RELEASE-amd64-disc1.iso
> >Fix:
Talk to KVM developers.

i386 kernel does not support this feature, 9.0 did not have it yet.

attachment0 (851 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: amd64/175780: Crash on KVM boot due to xsave instruction issue

Konstantin Belousov
In reply to this post by Kaloyan Ganchev
The following reply was made to PR amd64/175780; it has been noted by GNATS.

From: Konstantin Belousov <[hidden email]>
To: Kaloyan Ganchev <[hidden email]>
Cc: [hidden email], [hidden email]
Subject: Re: amd64/175780: Crash on KVM boot due to xsave instruction issue
Date: Sat, 2 Feb 2013 17:02:42 +0200

 --QOtWmwZ6xSENhj9o
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Sat, Feb 02, 2013 at 01:04:14PM +0000, Kaloyan Ganchev wrote:
 > When trying to boot FreeBSD 9.1 on kvm host  with the following command:
 >=20
 > kvm -cpu core2duo,+xsave -enable-kvm -drive file=3Dfreebsd-9.1-qcow2.img =
 -boot d -net nic -net user -nographic -vnc :0  -cdrom ./isos/FreeBSD-9.1-RE=
 LEASE-amd64-disc1.iso=20
 >=20
 > The kernel return the following error immediately after taking over from =
 the loader:
 >=20
 > panic: CPU0 does not support X87 or SSE : 0
 >=20
 > If I do not expose the xsave cpu flag to the FreeBSD guest the virtual ma=
 chine boot as expected.
 > This problem do not appear in 9.1 i386 and 9.0 amd64 releases.
 This is a misconfigured hypervisor, or a bug in the hypervisor.
 
 FreeBSD amd64 assumes that both X87 FPU and SSE2 are present for any
 CPU capable of long mode. It is enforced by the Unix amd64 ABI.
 
 Intel documentation states that CPUID leaf 0xd must report the presence of
 FPU extensions, and since for the long mode capable CPU, SSE2 and X87 must
 be present, we re-check the report. Aparently, the returned CPUID data
 is wrong.
 
 > Also I tried several other cpu models instead of the core2duo and it does=
 n't make a difference, if xsave is exposed to the guest, FreeBSD 9.1 amd64 =
 fails to boot with the error above.
 > >How-To-Repeat:
 > kvm -cpu core2duo,+xsave -enable-kvm -drive file=3Dfreebsd-9.1-qcow2.img =
 -boot d -net nic -net user -nographic -vnc :0  -cdrom ./isos/FreeBSD-9.1-RE=
 LEASE-amd64-disc1.iso=20
 > >Fix:
 Talk to KVM developers.
 
 i386 kernel does not support this feature, 9.0 did not have it yet.
 
 --QOtWmwZ6xSENhj9o
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (FreeBSD)
 
 iQIcBAEBAgAGBQJRDSqRAAoJEJDCuSvBvK1BKkkP/2LwthEm1J//zuFlQq+o7BNe
 XFv9pkm7bAiKqFT46n4cs0sfoO9lC26+bPU7/jSSDDLGNCpfp9UYQJFMuTowhD8n
 Ee5TiyMDAeYq5kpiV7jpHf+Wphwaq1pEVNGeV4AMyQAV9l20YlHzzMESHn96pxOG
 1NLj6yzPqIzD1gDui6kpNLjmY2SUqCkI0HL/Ji/QFpYu6ciY1FFpHe7e/VTZPnJj
 1OJ2j3diVLbDT+ElWg0Gog5In3vcnsD36+mxJm0li5nK7CdoTFyhFi7e/2md1nj+
 /Is/vhXLnLM7o+EWkNSxM33sOxTjiwCK69sGShLkSdjVJR36brScJchaiZ7XQBfA
 69k7cGrBuwMaWcWNpYb/SyV7etz8OwYre//m4QCJXxEcpGV772TORGqC6xpiZXct
 LFuAuRLG6Vn/e0QtLRfKTmu3tQkaNWTfBYBcmGCv4tMBa/G39cnSwsxpUhMEfFjU
 Gh2UXTj9+MheOJBuwmeYjsKQofCy7Y6Q0dDPyokyzWyEVIF59NF7zQjgXt/1qDmz
 yaPzrHU2y0PizzQGdcd0wmJi+ZyR79NI5mN1nU7tFQQAZ0euv6ZEZTKKMiZQhxTo
 8UQ+UWF6H5TdO484HY/siJm8EplNKRQ534ftpORwnHKOd223ONq4I+M3XENvd6Fi
 ZNi2NG8PpQEBsmGJt3g4
 =x2yi
 -----END PGP SIGNATURE-----
 
 --QOtWmwZ6xSENhj9o--
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: amd64/175780: Crash on KVM boot due to xsave instruction issue

Konstantin Belousov-3
In reply to this post by Kaloyan Ganchev
Synopsis: Crash on KVM boot due to xsave instruction issue

State-Changed-From-To: open->closed
State-Changed-By: kib
State-Changed-When: Mon Feb 4 11:42:26 UTC 2013
State-Changed-Why:
It is not FreeBSD bug, most likely.

http://www.freebsd.org/cgi/query-pr.cgi?pr=175780
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"