Some commands fail with illegal instruction errors running under qemu. Host OS is fc6t2 base with some rawhide updates: qemu-0.8.2-3.fc6 2.6.17-1.2174_FC5 Guest OS is a barebones install of fc6t2. A couple of the init scripts fail with illegal instruction "/etc/rc.d/rc.sysinit: line 299: 292 Illegal instruction" and notably, the 'ps' command when logged in. Otherwise, it seems pretty much ok, but I haven't tried doing much. Also, this is a Pentium M laptop.
And FC6 final won't even boot in QEMU due to the same issue. This affects both x86 and x86_64 guests. There is a fix for this already in QEMU CVS, please apply! (Attaching.)
Created attachment 140074 [details] Fix for FC6 guest illegal instructions from QEMU CVS This patch to target-i386/translate.c from QEMU CVS makes FC6 x86 and x86_64 guests work. It applies cleanly to the QEMU 0.8.2 Extras package.
Created attachment 140075 [details] Patch to the specfile to apply qemu-0.8.2-mb-nops.diff This patch updates the QEMU specfile so the qemu-0.8.2-mb-nops.diff backported from QEMU CVS is applied.
I am not one of the nutters who gets all protective about my Extras packages. Please go ahead and commit and build it -- I'm not going to get round to this any time soon because I'm insanely busy with OLPC stuff.
Unfortunately, I don't have CVS access (as I don't own any package yet).
Want to own qemu? :)
Uh, thanks for the offer, but: * I'm so busy that I wasn't even able to answer in a timely manner, * as a new contributor, I'd have to go through the sponsorship process, CLA signing, account requests and all that bureaucracy first, * last I checked, the preferred way to get sponsored was still to provide some package of one's own rather than adopting an existing one.
I'm not a heavy user of qemu, but I wouldn't mind co-maintaining it and I could push a fix for this, David, does that sound like a plan?
Works for me -- thanks. I haven't actually got home since my last comment, and won't be getting home before the end of this week either... :)
I've just finished building a qemu with the patches applied, but it won't run unmodified on a default FC-6 system because of selinux troubles. The problem is that it requires execmem which selinux disallows by default. The fix for this is to add a "chcon -t unconfined_execmem_exec_t /usr/bin/qemu" to %post + the necesarry magic to make this chcon permanent (which I do not know by head, but have done before). David, is it ok with you to add this special selinux %post? Otherwise qemu won't work out of the box.
(In response to comment 10) Fine by me if someone with a clue about SElinux says it's the correct fix. Thanks again.
I have added the fix in the file context, but it would be better to write a policy for qemu, but for now I have labeled it unconfined_execmen_exec_t. Fixed in selinux-policy-2.4.3-12
dwalsh, any chance on a selinux-policy update for FC-6 with this fix in soonish, or would it be better to add the necessary %post magic as an intermediate msolution for now?
p.s. qemu installs multiple binaries which need execmem under /usr/bin, so the context shpuld be applied for /usr/bin/qemu* not just /usr/bin/qemu
I am trying to release once per week. On Mondays I put out a test package and I push it to release on Thursday/Friday. But next week is a short week because of Thanksgiving, in the US. So I will push the current test release to final on Thursday and put this fix out on Thursday to test. With final being next Tuesday. That soon enough? Dan
Yes, excellent, asked because I had no idea the policy got updated that often for Core releases (I almost always use rawhide).
I've just completed building 0.8.2-4 for FC-5, 6 and devel, which should fix this once they hit the repo. Note that FC-6 users with selinux enabled need to disable enforcing (or do the chcon mentioned above) untill an updated policy hits the FC-6 updates.
I am far away from beeing an selinux expert, but I read that semanage is the tool to make changes permanent, but I do not know how well this works with policy updates. The command would be something like: semanage fcontext -a -t unconfined_execmem_exec_t /usr/bin/qemu* Maybe the -a needs to be replaced by an -m.
yes, semanage is the %post magic I was talking about, but since the correct context has been added to the policy there is no need for that anymore.