Bug 638489

Summary: lost interrupt on hda is reported when rhel3.9 64bit guest is booting up on AMD host.
Product: Red Hat Enterprise Linux 6 Reporter: Johnny Liu <jialiu>
Component: qemu-kvmAssignee: Alex Williamson <alex.williamson>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0CC: mah, michen, mkenneth, tburke, virt-maint
Target Milestone: beta   
Target Release: 6.1   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
When a 64 bit RHEL3 guest is installed on an AMD host system, it will use the x86_64 RHEL3 kernel. If only a single vCPU is assigned to the guest, the uniprocessor (UP) kernel will be installed, which encounters a known issue with the UP-APIC support when running on KVM. This problem can be avoided by booting the guest with the "noapic" guest kernel parameter or by assigning multiple vCPUs to the guest for installation. This will result in the SMP guest kernel being installed, which does not have this issue. Additionally, x86_64 RHEL3 kernels do not include software IOTLB support which results in problems with emulated or assigned IO devices when more than 3584MB of memory is assigned to the guest. To avoid this problem, the ia32e kernel can be used instead of the x86_64 kernel, which does include software IOTLB support. This kernel also avoids the UP-APIC issue as it's an SMP kernel. The recommended procedure for installing a 64bit RHEL3 guest on an AMD host would then be: 1) Configure the guest with a single CPU and 3584MB (or less) memory. 2) Post-install, interrupt booting and modify the kernel command line to include the "noapic" option. 3) Boot the guest and install the ia32e kernel. 4) Power off the guest, reconfigure assigned memory and CPUs as desired. The guest should then behave normally and not require any extra boot options.
Story Points: ---
Clone Of:
: 654550 (view as bug list) Environment:
Last Closed: 2011-09-20 15:18:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 580954, 654550    
Attachments:
Description Flags
guest dmesg output none

Description Johnny Liu 2010-09-29 07:03:18 UTC
Description of problem:
Install a rhel3u9 64bit guest on AMD host, when the guest is booting up, the following is reported:
hda: lost interrupt

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.113.el6_0.1.x86_64
kernel-2.6.32-71.2.1.el6_0.x86_64
libvirt-0.8.1-27.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install a RHEL3U9 x86_64 guest on AMD host via virt-install
# virt-install -n vm-rhel3u9-64 -r 1024 -f /var/lib/libvirt/images/vm-rhel3u9-64.img -s 5 -l http://download.englab.nay.redhat.com/pub/rhel/released/RHEL-3/U9/AS/x86_64/tree/ -x ks=http://home.englab.nay.redhat.com/~nzhang/http/ks-rhel3u9-x86_64.cfg
2. After installation is finished, the guest will reboot, check the boot up process.

  
Actual results:
"lost interrupt" is seen on guest's boot. 
Wait for a long time (about 10 mins), the guest is started up.

Output of dmesg:

<----snipped----->

hda: QEMU HARDDISK, ATA DISK drive
blk: queue ffffffff804e0c60, no I/O memory limit
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: attached ide-disk driver.
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: 10485760 sectors (5369 MB) w/256KiB Cache, CHS=652/255/63, (U)DMA
hda: lost interrupt
hda: lost interrupt
ide-floppy driver 0.99.newide
Partition check:
 hda: hda1 hda2 hda3

<----snipped----->

EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,2), internal journal
hda: lost interrupt
hda: lost interrupt
kjournald starting.  Commit interval 5 seconds
EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,1), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
hda: dma_timer_expiry: dma status == 0x24
hda: DMA interrupt recovery
hda: lost interrupt
Adding Swap: 2024180k swap-space (priority -1)
hda: dma_timer_expiry: dma status == 0x24
hda: DMA interrupt recovery
hda: lost interrupt
SCSI subsystem driver Revision: 1.00

<----snipped----->

The whole output of dmesg will be attached.

# ps -ef|grep vm-rhel3u9
qemu      4599     1 14 12:56 ?        00:04:38 /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name vm-rhel3u9-64 -uuid 93e6793c-349c-890b-665e-4f83aacaed5b -nodefconfig -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/vm-rhel3u9-64.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=utc -boot c -drive file=/var/lib/libvirt/images/vm-rhel3u9-64.img,if=none,id=drive-ide0-0-0,boot=on,format=raw,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,fd=23,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:43:f5:32,bus=pci.0,addr=0x3 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:1 -k en-us -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4

host cpu info:
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 67
model name	: Dual-Core AMD Opteron(tm) Processor 1216
stepping	: 3
cpu MHz		: 1000.000
cache size	: 1024 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnow
ext 3dnow rep_good extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy
bogomips	: 2009.64
TLB size	: 1024 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc


Expected results:
The guest is booted up smoothly.

Additional info:
On Intel host, the issue does NOT happen.
On AMD host, this issue does NOT happen with rhel4u8 x86_64 guest

Comment 1 Johnny Liu 2010-09-29 07:05:01 UTC
Created attachment 450381 [details]
guest dmesg output

Comment 4 Mark A. Hershberger 2011-04-20 17:31:47 UTC
I had this problem.  Booting with the virtual host with "linux noapic" at the lilo prompt worked.  May also be related to http://bugs.debian.org/616674

Comment 8 Alex Williamson 2011-09-19 15:43:33 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When a 64 bit RHEL3 guest is installed on an AMD host system, it will use the x86_64 RHEL3 kernel.  If only a single vCPU is assigned to the guest, the uniprocessor (UP) kernel will be installed, which encounters a known issue with the UP-APIC support when running on KVM.  This problem can be avoided by booting the guest with the "noapic" guest kernel parameter or by assigning multiple vCPUs to the guest for installation.  This will result in the SMP guest kernel being installed, which does not have this issue.

Additionally, x86_64 RHEL3 kernels do not include software IOTLB support which results in problems with emulated or assigned IO devices when more than 3584MB of memory is assigned to the guest.  To avoid this problem, the ia32e kernel can be used instead of the x86_64 kernel, which does include software IOTLB support.  This kernel also avoids the UP-APIC issue as it's an SMP kernel.

The recommended procedure for installing a 64bit RHEL3 guest on an AMD host would then be:

1) Configure the guest with a single CPU and 3584MB (or less) memory.
2) Post-install, interrupt booting and modify the kernel command line to include the "noapic" option.
3) Boot the guest and install the ia32e kernel.
4) Power off the guest, reconfigure assigned memory and CPUs as desired.

The guest should then behave normally and not require any extra boot options.