From: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
To: Steffen Winterfeldt <snwint-l3A5Bk7waGM@public.gmane.org>
Cc: kvm-devel
<kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Subject: Re: [GFXBOOT] [PATCH] When switching to real-mode, pass SS in a GP register
Date: Thu, 11 Oct 2007 09:53:47 -0500 [thread overview]
Message-ID: <470E38FB.1040003@codemonkey.ws> (raw)
In-Reply-To: <Pine.LNX.4.64.0710081237050.22177-128n8RpADxRbpigZmTR7Iw@public.gmane.org>
Steffen Winterfeldt wrote:
> Hi,
>
> sorry for the delay, but I've been on vacation. :-)
>
No worries :-)
>> You're right. Good catch!
>>
>
> Actually that is not true. 'mov eax,ss' does implicitly clear the upper
> 16 bits (both processor docs and hardware agree here).
>
I wasn't able to find anything definitive in my manuals but I didn't
look very hard. I figured that erring on the safe side is better anyway.
> Anyway, ss is already saved, so no need for an extra register. Here is
> my version (tested and works on my machine):
>
This patch works for me under KVM. Thanks!
Regards,
Anthony Liguori
> --- bincode.asm (revision 650)
> +++ bincode.asm (working copy)
> @@ -15546,7 +15546,11 @@
> mov ax,pm_seg.prog_d16
> mov ds,ax
>
> - mov eax,ss
> + ; needed for KVM:
> + ; ss:rpl must equal cs:rpl in PM for VT. We can't rely on ss
> + ; maintaining its value after the transition.
> +
> + movzx eax,word [rm_seg.ss]
> and esp,0ffffh
> shl eax,4
> add esp,eax
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
prev parent reply other threads:[~2007-10-11 14:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-30 4:29 [GFXBOOT] [PATCH] When switching to real-mode, pass SS in a GP register Anthony Liguori
[not found] ` <46FF262C.9000900-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-09-30 6:10 ` Avi Kivity
[not found] ` <46FF3DF3.7040503-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-30 7:08 ` Anthony Liguori
[not found] ` <46FF4B53.5070807-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-10-08 10:52 ` Steffen Winterfeldt
[not found] ` <Pine.LNX.4.64.0710081237050.22177-128n8RpADxRbpigZmTR7Iw@public.gmane.org>
2007-10-11 14:53 ` Anthony Liguori [this message]
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=470E38FB.1040003@codemonkey.ws \
--to=anthony-rdkfgonbjusknkdkm+me6a@public.gmane.org \
--cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=snwint-l3A5Bk7waGM@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox