From: Anthony Liguori <aliguori@linux.vnet.ibm.com>
To: Avi Kivity <avi@redhat.com>
Cc: qemu-devel@nongnu.org, Marcelo Tosatti <mtosatti@redhat.com>,
kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH master, stable-0.12] linuxboot: fix gdt address calculation
Date: Fri, 08 Jan 2010 10:41:12 -0600 [thread overview]
Message-ID: <4B476028.2090605@linux.vnet.ibm.com> (raw)
In-Reply-To: <1261661930-11888-1-git-send-email-avi@redhat.com>
On 12/24/2009 07:38 AM, Avi Kivity wrote:
> The gdt address calculation in linuxboot.bin is broken in two ways: first
> it loads %cs into %eax, but that instruction leaves the high bits of %eax
> undefined and we did not clear them. Secondly, we completely ignore the
> incorrect %eax, and use the undefined %ebx instead.
>
> With these issues fixed, linuxboot works again.
>
> Signed-off-by: Avi Kivity<avi@redhat.com>
>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> pc-bios/optionrom/linuxboot.S | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> 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)
>
WARNING: multiple messages have this Message-ID (diff)
From: Anthony Liguori <aliguori@linux.vnet.ibm.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH master, stable-0.12] linuxboot: fix gdt address calculation
Date: Fri, 08 Jan 2010 10:41:12 -0600 [thread overview]
Message-ID: <4B476028.2090605@linux.vnet.ibm.com> (raw)
In-Reply-To: <1261661930-11888-1-git-send-email-avi@redhat.com>
On 12/24/2009 07:38 AM, Avi Kivity wrote:
> The gdt address calculation in linuxboot.bin is broken in two ways: first
> it loads %cs into %eax, but that instruction leaves the high bits of %eax
> undefined and we did not clear them. Secondly, we completely ignore the
> incorrect %eax, and use the undefined %ebx instead.
>
> With these issues fixed, linuxboot works again.
>
> Signed-off-by: Avi Kivity<avi@redhat.com>
>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> pc-bios/optionrom/linuxboot.S | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> 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)
>
next prev parent reply other threads:[~2010-01-08 16:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-24 13:38 [PATCH master, stable-0.12] linuxboot: fix gdt address calculation Avi Kivity
2009-12-24 13:56 ` Paolo Bonzini
[not found] ` <1261664861-15493-1-git-send-email-pbonzini@redhat.com>
2010-01-07 20:03 ` [Qemu-devel] [PATCH] write option roms in pc-bios/ Anthony Liguori
2010-01-08 7:31 ` [Qemu-devel] " Paolo Bonzini
2010-01-08 7:57 ` Aurelien Jarno
2010-01-08 8:19 ` Paolo Bonzini
2010-01-08 9:12 ` Aurelien Jarno
2010-01-08 12:29 ` Anthony Liguori
2010-01-08 16:41 ` Anthony Liguori [this message]
2010-01-08 16:41 ` [Qemu-devel] [PATCH master, stable-0.12] linuxboot: fix gdt address calculation Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B476028.2090605@linux.vnet.ibm.com \
--to=aliguori@linux.vnet.ibm.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.