Red Hat Bugzilla – Bug 437358
F-10 pv_ops xen: Add ia32 emulation
Last modified: 2009-12-14 15:38:36 EST
Currently, 32-bit binaries cause the x86_64 pvops kernel-xen to crash on
general protection fault: 0000 
Modules linked in:
Pid: 1404, comm: mbchk Not tainted 2.6.25-rc3-pvops #90
RIP: e030:[<ffffffff802219c0>] [<ffffffff802219c0>] ia32_syscall+0x0/0x44
RSP: e02b:ffff8800ba7fdfc8 EFLAGS: 00010296
RAX: 000000000000007a RBX: 00000000ffffdaf6 RCX: ffffffff802219c0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 00000000ffffdcf8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS: 00007ffff7fe86f0(0000) GS:ffffffff8058b000(0000) knlGS:0000000000000000
CS: e033 DS: 002b ES: 002b CR0: 000000008005003b
CR2: 0000000008054d40 CR3: 00000000b853c000 CR4: 0000000000002620
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000000
Process mbchk (pid: 1404, threadinfo ffff8800ba7fc000, task ffff8800ba690af0)
Stack: 00000000ffffe000 0000000000000000 0000000008054d4d 0000000000000023
0000000000000296 00000000ffffdacc 000000000000002b
Code: 8b 64 24 18 48 8b 6c 24 20 48 8b 5c 24 28 48 83 c4 30 41 87 e9 44 8b 44
24 68 e9 f5 fe ff ff 48 c7 c0 f2 ff ff ff eb 65 0f 1f 00 <0f> 01 f8 fb 89 c0
50 fc 48 83 ec 48 48 89 7c 24 40 48 89 74 24
RIP [<ffffffff802219c0>] ia32_syscall+0x0/0x44
ia32 emulation will be temporarily disabled on x86_64 kernel-xen until this
bug is fixed.
Basically, this means that ia32 binaries don't work on x86_64 xen right now.
We're not sure yet whether we'll get this fixed by GA.
Looks like we'll have to punt this to F10 (or a post GA F9 update)
*** Bug 442685 has been marked as a duplicate of this bug. ***
bug #442685 details how not having ia32 emulation means that guest installs hang
at the very end when grub (a 32 bit binary) can't be executed ...
This is less critical than it sounds - pygrub doesn't require grub-install to
have been run, so when the install hangs you should be able to reboot without
any problems. Very annoying, though.
The experimental code on the ia32emu-dev branch on xen-pvops-64.git is able
to run simple ia32 binaries, but it is not completely stable. nash segfaults
when loading a 32-bit initrd and the kernel oopses when booting using a 64-bit
initrd and 32-bit root filesystem.
It is able to run grub, though. :)
Okay, these look fairly sane to me - the changes are:
- always use int80 for ia32 syscalls, never sysenter
- handle the different stack format for int80 entry under xen
- use pv_ops irq_enable/disable in ia32 syscall asm
I'll give them a test tomorrow, but if it looks like it fixes grub-install on
x86_64 and doesn't cause any other regressions, then I think we should include them.
Created attachment 302774 [details]
Created attachment 302775 [details]
Created attachment 302776 [details]
Created attachment 302777 [details]
Created attachment 302778 [details]
The risk of enabling ia32 emulation as it is now is security: it is very easy
to Oops the kernel when running ia32 binaries.
Okay, that's a fair point
I've reopened bug #442685, and am putting back on the F10_XenPvOps tracker for now
Would it be possible to add a command line argument to enable ia32 emulation?
That way installs could be run with it, but then turned off for normal operation.
Got it a little better with an additional fix.
Now, half of the initscripts from a 32-bit filesystem image run, but with
random segfaults and hangs.
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
*** Bug 448465 has been marked as a duplicate of this bug. ***
Pulled in Eduardo's patches from here:
and re-enabled CONFIG_IA32_EMULATION
Will be in kernel-xen-2.6-184.108.40.206-4.fc10 and kernel-xen-2.6-220.127.116.11-2.fc9
* Thu May 29 2008 Mark McLoughlin <email@example.com>
- Enable ia32 emulation (ehabkost, #437358)
kernel-xen-2.6-18.104.22.168-2.fc9 has been submitted as an update for Fedora 9
Thanks, that seems to have fixed it (bug 448465, installing glibc.i686) for me.
(In reply to comment #21)
> Thanks, that seems to have fixed it (bug 448465, installing glibc.i686) for me.
Thanks for testing; could you bump the update's karma here:
*** Bug 451520 has been marked as a duplicate of this bug. ***
kernel-xen-2.6-22.214.171.124-2.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.