Bug 491625 - Unable to run RHEL-5 Xen within KVM guest
Summary: Unable to run RHEL-5 Xen within KVM guest
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Marcelo Tosatti
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F11VirtTarget
TreeView+ depends on / blocked
 
Reported: 2009-03-23 12:10 UTC by Daniel Berrangé
Modified: 2009-04-19 14:57 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
: 491843 (view as bug list)
Environment:
Last Closed: 2009-04-16 02:56:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
HV serial console log (2.52 KB, text/plain)
2009-03-23 12:10 UTC, Daniel Berrangé
no flags Details
libvir guest config (1.42 KB, text/plain)
2009-03-23 12:18 UTC, Daniel Berrangé
no flags Details
QEMU stdout log/command line (926 bytes, text/plain)
2009-03-23 12:19 UTC, Daniel Berrangé
no flags Details
stap script to disable pit irq ack logic (1.74 KB, application/octet-stream)
2009-04-04 18:00 UTC, Marcelo Tosatti
no flags Details

Description Daniel Berrangé 2009-03-23 12:10:47 UTC
Created attachment 336275 [details]
HV serial console log

Description of problem:
I have a guest running RHEL-5 Xen Hypervisor. On Fedora 9 KVM it worked fine (PV guest only of course). After upgrading to Fedora 11 rawhide, it no longer boots. Xen complains:


(XEN) ENABLING IO-APIC IRQs
(XEN)  -> Using new ACK method
(XEN) ..MP-BIOS bug: 8254 timer not connected to IO-APIC
(XEN) 
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) IO-APIC + timer doesn't work!  Boot with apic=debug and send a report.  Then try booting with the 'noapic' option****************************************
(XEN) 
(XEN) Reboot in five seconds...



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

  2.6.29-0.258.rc8.git2.fc11.x86_64
  qemu-0.10-0.9.kvm20090310git.fc11.x86_64

In guest

  kernel-xen-2.6.18-128.el5.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install RHEL5 in a guest
2. Switch guest to use  kernel-xen kerenl
3.
  
Actual results:
Hypervisor fails to boot

Expected results:
HV boots and can run PV guests

Additional info:

Comment 1 Daniel Berrangé 2009-03-23 12:14:47 UTC
NB, booting the RHEL5 Xen Guest Hypervisor with 'noapic' works, but obviously that's undesirable as a real solution

Comment 2 Daniel Berrangé 2009-03-23 12:18:48 UTC
Created attachment 336276 [details]
libvir guest config

Comment 3 Daniel Berrangé 2009-03-23 12:19:45 UTC
Created attachment 336277 [details]
QEMU stdout log/command line

Comment 4 Daniel Berrangé 2009-03-23 12:27:06 UTC
FYI, adding  -no-kvm-irqchip  also makes it boot correctly, but this isn't really a supportable solution either.

Comment 5 Mark McLoughlin 2009-03-25 10:00:00 UTC
Marcelo: an ideas?

Comment 6 Marcelo Tosatti 2009-03-26 18:07:13 UTC
Does it boot with -no-kvm-pit?

Comment 7 Daniel Berrangé 2009-03-27 11:26:04 UTC
Yes, it also works with -no-kvm-pit.

Comment 8 Marcelo Tosatti 2009-04-04 17:59:15 UTC
I think this bug is caused by:

http://lists.xensource.com/archives/html/xen-changelog/2006-03/msg00102.html

Which effectively disables the PIC initialization for the paravirt kernel's 
PIT-through-IO_APIC boot check.

Recently KVM was changed to reinject timer interrupts only when the previous
one has been acked, which is not the case with the above changes in Xen.

It will probably be necessary to add an option to control such behavior.

Dan, can you please confirm the theory by executing the attached systemtap script with:

# stap -g xen-pit-fc11.stp

And then start the Xen guest?

Thanks

Comment 9 Marcelo Tosatti 2009-04-04 18:00:50 UTC
Created attachment 338173 [details]
stap script to disable pit irq ack logic

stap script to disable pit irq ack logic

Comment 10 Daniel Berrangé 2009-04-06 10:02:06 UTC
Yes that stap script makes it boot successfully.

Comment 11 Marcelo Tosatti 2009-04-06 13:45:04 UTC
Hum, I think this has been fixed by

commit f1c45dd4a6efcf22119e0cadd3471b86e0ddc767
Author: Avi Kivity <avi>
Date:   Sun Jan 4 18:06:06 2009 +0200

    KVM: Reset PIT irq injection logic when the PIT IRQ is unmasked

Which is not part of 2.6.29.

Comment 12 Mark McLoughlin 2009-04-09 15:20:45 UTC
Marcelo has posted some patches to fedora-kernel-list:

  http://www.redhat.com/archives/fedora-kernel-list/2009-April/msg00005.html

Comment 13 Marcelo Tosatti 2009-04-09 22:46:54 UTC
Daniel,

Can you please give a try at the following kernel RPM:

http://koji.fedoraproject.org/koji/taskinfo?taskID=1288099

Thanks

Comment 14 Daniel Berrangé 2009-04-14 15:26:20 UTC
Yes, this kernel build works for my tests

Comment 15 Marcelo Tosatti 2009-04-14 17:19:57 UTC
Thanks Daniel.

The patches have been committed to Fedora CVS.

Comment 16 Mark McLoughlin 2009-04-19 14:57:30 UTC
Fixed for F11 by:

* Thu Apr 14 2009 Marcelo Tosatti <mtosatti>
- kvm fixes for bz#491625


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