Bug 592026

Summary: Auto-assignment of PCI addresses is not compatible with RHEL-5.4
Product: Red Hat Enterprise Linux 6 Reporter: Daniel Berrangé <berrange>
Component: libvirtAssignee: Daniel Berrangé <berrange>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: dallan, hbrock, mjenner, veillard, xen-maint, ydu, yoyzhang
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0_8_1-18_el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-11 14:48:23 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: 609432    
Attachments:
Description Flags
Partial fix for PCI ordering compatibility none

Description Daniel Berrangé 2010-05-13 17:39:18 UTC
Description of problem:
Libvirt has an algorithm for auto-assigning PCI addresses to devices when a guest is defined on the host. This algorithm is not the same as the implicit one that a RHEL5.4 based QEMU will do. For machine types rhel-5.x we need to set PCI addresses in a manner that is compatible with the RHEL-5.4 KVM

Version-Release number of selected component (if applicable):
libvirt-0.8.1-1.el6

How reproducible:
Always

Steps to Reproduce:
1. Define a guest on RHEL-5.4 with a disk, SCSI controller, NIC, sound card, host PCI device
2. Define the same guest on RHEL-6 host, using 'rhel-5.4' as the machine type
3. Rnu 'lspci' in both guests
  
Actual results:
PCI address ordering is different

Expected results:
PCI address ordering is identical

Additional info:

Comment 2 RHEL Program Management 2010-05-13 19:06:28 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Daniel Berrangé 2010-06-14 15:19:59 UTC
Created attachment 423867 [details]
Partial fix for PCI ordering compatibility

This patch addresses all PCI ordering problems except for the VirtIO balloon. Libvirt currently hardcodes the balloon driver in slot 3 because we don't record it as a device in the XML & thus can't track an alternate location. In RHEL5 the VirtIO balloon came 'last' of all devices, which is essentially a arbitrary location if hotplugging is taken into account. To cope with this we need to model the virtio balloon device in the XML and record its first address.

Comment 4 Daniel Berrangé 2010-07-20 14:12:54 UTC
Full fix upstream

https://www.redhat.com/archives/libvir-list/2010-July/msg00420.html

Comment 6 Dave Allan 2010-07-21 15:46:10 UTC
libvirt-0_8_1-17_el6 has been built in RHEL-6-candidate with the fix.

Dave

Comment 7 Daniel Veillard 2010-07-22 06:41:23 UTC
The patch leads to a regression 617064, reopenning,

Daniel

Comment 8 Daniel Veillard 2010-07-22 06:42:38 UTC
*** Bug 617064 has been marked as a duplicate of this bug. ***

Comment 10 Daniel Veillard 2010-07-22 13:22:12 UTC
libvirt-0_8_1-18_el6 has been built in RHEL-6-candidate with the fix.

Dave

Comment 12 yanbing du 2010-08-11 10:21:20 UTC
1. Define guest rhel4u8-i386 on RHEL-5.4 
[root@localhost redhat]# /sbin/lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.2 USB Controller: Intel Corporation 82371SB PIIX3 USB
[Natoma/Triton II] (rev 01)
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL-8139/8139C/8139C+ (rev 20)
00:04.0 Multimedia audio controller: Intel Corporation 82801AA AC'97
Audio Controller (rev 01)
00:05.0 RAM memory: Qumranet, Inc. Virtio memory balloon

2. Define the same guest on RHEL-6 host, the machine type is 'rhel-5.4'
[root@localhost redhat]# /sbin/lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.2 USB Controller: Intel Corporation 82371SB PIIX3 USB
[Natoma/Triton II] (rev 01)
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL-8139/8139C/8139C+ (rev 20)
00:04.0 Multimedia audio controller: Intel Corporation 82801AA AC'97
Audio Controller (rev 01)
00:05.0 RAM memory: Qumranet, Inc. Virtio memory balloon

PCI address ordering is identical.
Move to VERIFIED.

Comment 13 releng-rhel@redhat.com 2010-11-11 14:48:23 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.