From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM crash on unusual PM->RM transition Date: Tue, 14 Apr 2009 11:14:01 +0300 Message-ID: <49E445C9.3000105@redhat.com> References: <49E3CDE1.8010001@zytor.com> <49E42260.7030009@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: "H. Peter Anvin" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:33531 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753026AbZDNINg (ORCPT ); Tue, 14 Apr 2009 04:13:36 -0400 In-Reply-To: <49E42260.7030009@zytor.com> Sender: kvm-owner@vger.kernel.org List-ID: H. Peter Anvin wrote: > H. Peter Anvin wrote: > >> The current test branch of Syslinux does PM->RM transition via a stub >> which can be located in high memory. This is correct and valid (x86 >> CPUs rely on this to boot): after clearing CR0.PE, CS.base retains its >> previous value until CS is reloaded by a far JMP (which in this case is >> the very next instruction). >> > > Some trivial research later... > > It looks like KVM will simply crash when it runs into a real-mode state > it can't approximate with V86 mode. I guess I had the failed notion > that it would kick back such "impossible" states to Qemu. > Exactly. There's the emulate_invalid_guest_state module parameter which tells kvm to emulate during such state instead. But this will often break as programs leave fs and gs in non-v86-mode compliant, requiring more of the emulator than it currently provides. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.