From patchwork Thu Dec 24 13:38:50 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 69722 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBODd14w006953 for ; Thu, 24 Dec 2009 13:39:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755264AbZLXNi5 (ORCPT ); Thu, 24 Dec 2009 08:38:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755221AbZLXNiz (ORCPT ); Thu, 24 Dec 2009 08:38:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32463 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754960AbZLXNix (ORCPT ); Thu, 24 Dec 2009 08:38:53 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBODcqjY029818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 24 Dec 2009 08:38:52 -0500 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nBODcpHI022592; Thu, 24 Dec 2009 08:38:51 -0500 Received: from localhost.localdomain (file.tlv.redhat.com [10.35.255.8]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 09E5225004D; Thu, 24 Dec 2009 15:38:51 +0200 (IST) From: Avi Kivity To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, Marcelo Tosatti Subject: [PATCH master, stable-0.12] linuxboot: fix gdt address calculation Date: Thu, 24 Dec 2009 15:38:50 +0200 Message-Id: <1261661930-11888-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/pc-bios/optionrom/linuxboot.S b/pc-bios/optionrom/linuxboot.S index c4c9109..8aebe51 100644 --- a/pc-bios/optionrom/linuxboot.S +++ b/pc-bios/optionrom/linuxboot.S @@ -86,9 +86,10 @@ copy_kernel: /* Now create the GDT descriptor */ movw $((3 * 8) - 1), -16(%bp) mov %cs, %eax + movzwl %ax, %eax shl $4, %eax - addl $gdt, %ebx - movl %ebx, -14(%bp) + addl $gdt, %eax + movl %eax, -14(%bp) /* And load the GDT */ data32 lgdt -16(%bp)