From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] extboot: properly set int 0x13 return value Date: Tue, 02 Dec 2008 14:12:58 +0200 Message-ID: <4935264A.4050006@redhat.com> References: <1228161692-13200-1-git-send-email-glommer@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, aliguori@us.ibm.com To: Glauber Costa Return-path: Received: from mx2.redhat.com ([66.187.237.31]:33061 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753225AbYLBMNF (ORCPT ); Tue, 2 Dec 2008 07:13:05 -0500 In-Reply-To: <1228161692-13200-1-git-send-email-glommer@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Glauber Costa wrote: > Callers of int 0x13 usually rely on the carry flag being > clear/set to indicate the status of the interrupt execution. > > However, our current code clear or set the flags register, > which is totally useless. Whichever value it has, will > be overwritten by the flags value _before_ the interrupt, due to > the iret instruction. > > This fixes a bug that prevents slackware (and possibly win2k, untested) > to boot. > > Applied, thanks. > > -.macro clc > - push %ax > - pushf > - pop %ax > - and $(~FLAGS_CF), %ax > - push %ax > - popf > - pop %ax > Anthony, any reason you did not use the 'clc' instruction instead of a macro? -- error compiling committee.c: too many arguments to function