From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: seabios 0.6.1 regression Date: Tue, 16 Nov 2010 12:47:33 +0200 Message-ID: <4CE26145.90904@redhat.com> References: <4CE13815.90902@redhat.com> <4CE14BFB.7070306@redhat.com> <4CE14DD7.4040102@redhat.com> <4CE15307.40801@redhat.com> <4CE15493.7070907@redhat.com> <4CE1568B.1090207@redhat.com> <4CE15B49.4000509@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit To: "Kevin O'Connor" , "seabios@seabios.org" , KVM list Return-path: Received: from mx1.redhat.com ([209.132.183.28]:28523 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932992Ab0KPKrz (ORCPT ); Tue, 16 Nov 2010 05:47:55 -0500 In-Reply-To: <4CE15B49.4000509@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/15/2010 06:09 PM, Avi Kivity wrote: > On 11/15/2010 05:49 PM, Avi Kivity wrote: >> On 11/15/2010 05:41 PM, Avi Kivity wrote: >>> >>> I think it's a miscompile. >>> >>> out/code16.o: >>> 1a4: 3e ds >>> 1a5: 6c insb (%dx),%es:(%edi) >>> >>> Note no 66 prefix. >>> >> >> It isn't, that was random crap. All the insb() code is 32-bit. >> > > Rewriting it to use inb / stos works (jecxz ; insb; loop doesn't) so > it looks like a kernel bug in insb emulation. > Turns out is was a subtle bug in the tpr optimization we do for Windows XP. The problem happens when we load the vapic option rom from the firmware config interface. With inb / movb, writing the vapic area happens in guest context, which the kernel is prepared to handle. With insb, the write happens from kvm, which is then undone on the next entry, leading to the tpr being set to a high value. I'll fix it temporarily by clearing the vapic area from the option rom. Later I'd like to add a proper reset to kvm tpr optimization within qemu-kvm (helps when we dual boot Windows XP and some other OS). -- error compiling committee.c: too many arguments to function