Pulling in fix for bug #140713 for Gutsy release
anthony at codemonkey.ws
Fri Oct 12 17:09:55 BST 2007
Matt Zimmerman wrote:
> It's up to the release managers whether this is worthwhile, though with
> gfxboot being such a critical and hardware-dependent component, making a
> change like this seems awfully risky at the 11th hour. It simply can't be
> properly tested at this point.
Here's a larger chunk of the code:
mov word [cs:rm_seg.ss],ss
mov word [cs:rm_seg.ds],ds
mov word [cs:rm_seg.es],es
mov word [cs:rm_seg.fs],fs
mov word [cs:rm_seg.gs],gs
o32 lgdt [cs:pm_gdt]
o32 lidt [cs:pm_idt]
; 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.
The new code is:
movzx eax,word [rm_seg.ss]
The old code did:
mov eax, ss
Which is impossible for VT to handle. The new code relies on the stored
value of ss in the first line I quoted instead of the value of ss from
before the transition to protected mode.
movzx is move with zero extension. That so the bottom 16 bits of eax
are ss and the top 16 bits are zero.
It's not are to see from inspection that the new code is correct. It's
very hard to conceive a scenario where this code could work on one
system and not on some other system.
Of course, I understand the testing concern and the relative risks of
including such a change so last minute. This is such an obvious bug fix
that effects so many users that I think it's at least worth consideration.
> On Thu, Oct 11, 2007 at 09:52:02AM -0500, Anthony Liguori wrote:
>> Due to real mode usage in gfxboot, Ubuntu has never been able to install
>> under KVM or Xen on Intel (VT) processors. The latest version of gfxboot
>> attempted to fix this problem but there is a bug.
>> A one-line fix is available that fixes the problem and allows Gutsy to be
>> installed under KVM or Xen. The fix came from the gfxboot maintainer
>> (Steffen Winterfeldt) and has gotten a lot of review on kvm-devel.
>> While it is rather late to apply such a fix, the reward is great (allowing
>> Gutsy to be used for open virtualization on Intel) and the risk is low
>> since the patch has gotten a lot of review and is pretty obvious.
>> I've included the patch in this email but the bug report should be
>> consulted for more information around the patch.
>> Sorry if this is the wrong place for such a request, I'm not that familiar
>> with how things work in Ubuntu. The bug hasn't gotten much attention on
>> launchpad and it's very important this is taken before the release of Gutsy
>> (or it won't be useful until Gutsy+1).
>> Anthony Liguori
>> --- a/bincode.asm 2007-07-24 05:49:46.000000000 -0500
>> +++ b/bincode.asm 2007-10-11 09:18:57.000000000 -0500
>> @@ -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
>> ubuntu-devel mailing list
>> ubuntu-devel at lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
More information about the ubuntu-devel