From nobody Thu Nov 6 14:23:33 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1489161343936127.97299834784951; Fri, 10 Mar 2017 07:55:43 -0800 (PST) Received: from localhost ([::1]:39669 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmMtK-00037A-4S for importer@patchew.org; Fri, 10 Mar 2017 10:55:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmMso-000368-KO for qemu-devel@nongnu.org; Fri, 10 Mar 2017 10:55:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmMsj-00056v-P3 for qemu-devel@nongnu.org; Fri, 10 Mar 2017 10:55:10 -0500 Received: from us-smtp-delivery-131.mimecast.com ([63.128.21.131]:56728) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cmMsj-00056K-L5 for qemu-devel@nongnu.org; Fri, 10 Mar 2017 10:55:05 -0500 Received: from mailhub5.stratus.com (mailhub.stratus.com [134.111.1.18]) by us-smtp-1.mimecast.com with ESMTP id us-mta-52-ZVwQbzxKOGahDYZB4l2Fmw-1; Fri, 10 Mar 2017 10:55:02 -0500 Received: from vostest4.mno.stratus.com (vostest4.mno.stratus.com [134.111.85.134]) by mailhub5.stratus.com (8.12.11/8.12.11) with ESMTP id v2AFt0NH010588; Fri, 10 Mar 2017 10:55:01 -0500 Received: by vostest4.mno.stratus.com (Postfix, from userid 0) id 3A56240827DB; Fri, 10 Mar 2017 10:55:00 -0500 (EST) From: Herbie Robinson To: qemu-devel@nongnu.org Date: Fri, 10 Mar 2017 10:54:55 -0500 Message-Id: <1489161295-23864-1-git-send-email-Herbie.Robinson@stratus.com> X-Mailer: git-send-email 1.8.3.1 X-MC-Unique: ZVwQbzxKOGahDYZB4l2Fmw-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 63.128.21.131 Subject: [Qemu-devel] [PATCH v3] SGABIOS: fix wrong video attrs for int 10h, ah==13h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, lvivier@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Fix Bug #1670509: wrong video attrs for int 10h, ah=3D=3D13h The subroutine set_cursor_position is trashing %bx. Unfortunately, %bl contains the video attribute for write_string. The fix saves %bx in the function prolog and restores it in the epilog.=20 Signed-off-by: Herbie Robinson Reviewed-by: Laurent Vivier --- Removed incorrect code deletions from set_current_cursor. Removed explanation of same from the commit message. BTW, I didn't see any test cases for this code, but if they exist and somebody points me at them, I should be able to generate a=20 very small qcow2 file that demonstrates the problem. sgabios.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sgabios.S b/sgabios.S index 275d063..96c4e23 100644 --- a/sgabios.S +++ b/sgabios.S @@ -1728,6 +1728,7 @@ write_string_tail: =20 set_cursor_position: pushw %ax + pushw %bx pushw %ds pushw $BDA_SEG popw %ds /* ds =3D 0x40 */ @@ -1738,6 +1739,7 @@ set_cursor_position: movw %ax, %bx /* bx =3D cursor save offset */ movw %dx, (%bx) /* save new cursor value */ popw %ds + popw %bx popw %ax ret =20 --=20 1.8.3.1