Bug 494376 - qemu-kvm -vga std fails because of ROM space increase patch
qemu-kvm -vga std fails because of ROM space increase patch
Product: Fedora
Classification: Fedora
Component: qemu (Show other bugs)
All Linux
high Severity medium
: ---
: ---
Assigned To: Glauber Costa
Fedora Extras Quality Assurance
: 495449 (view as bug list)
Depends On:
Blocks: F11VirtBlocker
  Show dependency treegraph
Reported: 2009-04-06 12:33 EDT by Tom London
Modified: 2009-04-21 04:53 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-04-21 04:53:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tom London 2009-04-06 12:33:53 EDT
Description of problem:
After upgrading from qemu-*-0.10-0.12.kvm20090323git.fc11.x86_64 to qemu-*-0.10-6.fc11.x86_64, my WinXP images no longer run:

alias kvm='qemu-kvm -localtime -vga std -m 512 -usbdevice tablet -name "Windows XP" -hda ~/VirtualMachines/raw.img -k en-us'

[tbl@tlondon ~]$ kvm
create_userspace_phys_mem: Invalid argument
kvm_cpu_register_physical_memory: failed
[tbl@tlondon ~]$ 

"Reverting" to qemu-*-0.10-3.fc11.x86_64 makes it "work for me"

System is Rawhide, Thinkpad X200.  No issues before the update.

See no messages in /var/log/messages nor in ~/.xsession-errors.

Version-Release number of selected component (if applicable):

How reproducible:
Every time.

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Tom London 2009-04-06 12:52:55 EDT
Forgot to include: running kernel-
Comment 2 Mark McLoughlin 2009-04-06 13:23:06 EDT
Okay, 0.10-4 was the change to increase the ROM space:

* Thu Apr 02 2009 Glauber Costa <glommer@redhat.com> - 2:0.10-4
- Support botting gpxe roms.
Comment 3 Sergei LITVINENKO 2009-04-06 14:19:01 EDT
Emulation video-cards vga and vmware cause start virtual machine problem

root# qemu-kvm -localtime -vga std -hda centos-5.img -boot c -net nic,macaddr=52:54:00:12:34:C5,model=e1000 -net tap -m 2047

cause error message:

create_userspace_phys_mem: Invalid argument
kvm_cpu_register_physical_memory: failed

Emulation of "cirrus" card is much better, but text console inside virtual machine is buggy. Scrolling do not work correct.

Try to login into text console and press <enter> more as 25 times. Cursor will leave view area.

`clear` or `reset` can return the cursor inside of view area

[root@homedesk QEMU]# rpm -qf `which qemu-kvm`

[root@homedesk QEMU]# uname -r
Comment 4 Glauber Costa 2009-04-06 22:05:39 EDT
this has nothing to do with windows xp.

Actually, I've already tracked it down (thanks for the report!), and the issue
seems related to -vga std option. I have a patch ready, will send upstream in a while.

thanks for reporting this!
Comment 5 Mark McLoughlin 2009-04-09 10:42:10 EDT
Glauber's patch for this is here:


Glauber - this looks fairly non-invasive ... if we're going to carry the "give ROMs more room" patch for F-11, it makes sense to pull this in too
Comment 6 Tom London 2009-04-09 12:33:15 EDT
I noticed qemu-img-0.10-7.fc11.x86_64 in koji; downloaded/installed.

It does not fix the issue for me:

[tbl@tlondon ~]$ qemu-kvm -localtime -vga std -m 512 -usbdevice tablet -name "Windows XP" -hda ~/VirtualMachines/raw.img -k en-us
create_userspace_phys_mem: Invalid argument
kvm_cpu_register_physical_memory: failed
[tbl@tlondon ~]$ rpm -qa qemu\*
[tbl@tlondon ~]$ 

Reverting back to qemu-*-0.10-3.fc11.x86_64 .....
Comment 7 Tom London 2009-04-11 11:42:10 EDT
Realize I haven't provided much info here...

Anything else I can do/provide to help this along?
Comment 8 Sergei LITVINENKO 2009-04-12 08:30:28 EDT
As I know, original version from official site http://sourceforge.net/project/showfiles.php?group_id=180599 do not crash with "-vga std" parameter.
Comment 9 Tom London 2009-04-15 09:31:59 EDT
Just FYI, this continues to fail with qemu-*-0.10-8.fc11.x86_64 as above.....
Comment 10 Tom London 2009-04-15 10:15:31 EDT
For the record:

[tbl@tlondon ~]$ rpm -qa qemu\*
[tbl@tlondon ~]$ qemu-kvm -localtime -vga std -m 512 -usbdevice tablet -name "Windows XP" -hda ~/VirtualMachines/raw.img -k en-us
create_userspace_phys_mem: Invalid argument
kvm_cpu_register_physical_memory: failed
[tbl@tlondon ~]$ 

On the other hand, Fedora iso seems to work just fine:

[tbl@tlondon VirtualMachines]$ qemu-kvm -m 512 -cdrom Fedora-11-Snap1-x86_64-Live.iso -boot d
[tbl@tlondon VirtualMachines]$ 

The only message I see in /var/log/messages is:

Apr 15 07:07:56 tlondon kernel: kvm: 12797: cpu0 unhandled wrmsr: 0xc0010117 data 0

Reverting back to 0.10-3 "fixes", but "adds" one more message in /var/log/messages:

Apr 15 07:11:55 tlondon kernel: kvm: 20256: cpu0 unhandled wrmsr: 0xc0010117 data 0
Apr 15 07:12:05 tlondon kernel: kvm: emulating exchange as write
Comment 11 Sergei LITVINENKO 2009-04-16 14:31:43 EDT

OK, it works for me :)

I have used http://download.fedora.redhat.com/pub/fedora/linux/development/source/SRPMS/qemu-0.10-8.fc11.src.rpm as base and this patch.

sh ./qemu-kvm -localtime -vga std -hda centos-5.img -boot c -m 2047

Good result.

PS: I'm waiting for this modification in next version of qemu-kvm
Comment 12 Tom London 2009-04-16 19:25:24 EDT
I can confirm: a local build with the 2047->4095 patch above makes 0.10-8 "work for me".
Comment 13 Mark McLoughlin 2009-04-19 06:32:34 EDT
*** Bug 495449 has been marked as a duplicate of this bug. ***
Comment 14 Mark McLoughlin 2009-04-19 08:18:58 EDT
Okay, AFAICS, this commit on the unstable branch upstream fixes the issue:


The key part is this:

+    cpu_register_physical_memory(0xc0000, 0x20000,
+                                 option_rom_offset | IO_MEM_ROM);

Now the entire 128kb region is being registered at once, meaning it is naturally 4k aligned for KVM's memory registration.

This code is a bit too invasive for this stage of F11, and it's our qemu-roms-more-room.patch which is causing the problem anyway ... so, I've gone ahead and built with Glauber's original simple patch:


Tom, Sergei, Peng - could one of you try it out and confirm it fixes the problem for you?

Comment 15 Tom London 2009-04-19 12:34:18 EDT
I can confirm that qemu-*-0.10-10.fc11.x86_64 from koji "works for me".
Comment 16 Sergei LITVINENKO 2009-04-20 07:00:57 EDT
I can confirm that qemu-*-0.10-9.fc11.i586.rpm from http://koji.fedoraproject.org/koji/buildinfo?buildID=98616 with "-vga std" works for me correct.

[root@homedesk QEMU]# rpm -qa | grep qemu

Comment 17 Peng Huang 2009-04-21 04:18:48 EDT
Using the qemu-system-x86-0.10-10 with -vga std. I can boot winxp in safe mode successfully. But can not boot winxp in normal mode.
Comment 18 Mark McLoughlin 2009-04-21 04:53:00 EDT
Many thanks Peng, Sergei and Tom

qemu-0.10-11.fc11 now tagged in dist-f11

Note You need to log in before you can comment on or make changes to this bug.