Bad ROM contents on pass-through card

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I started trying to pass through a PCI-E card to a KVM guest early this year. Other hardware can be passed through successfully, but the guest sees the wrong option ROM for this card.

My system is an AMD CPU and GA-970A-D3 motherboard. There are currently two Radeon HD 3470 cards installed, partially so that I could read their ROMs into a file.

The host OS is CentOS 6.3, and I've updated seabios and qemu to current versions.

My guest is started with:

/usr/local/bin/qemu-system-x86_64 ... -vga cirrus \
-device pci-assign,host=05:00.0,id=hostdev1,configfd=27,\
bus=pci.0,addr=0x5,romfile=/var/lib/libvirt/images/Radeon3470-5.rom

However, when the guest tries to read the ROM for the ATI card, it's seeing the ROM for the emulated cirrus card instead:

# strings /sys/devices/pci0000:00/0000:00:05.0/rom | head -4
Plex86/Bochs VGABios (PCI)
current-cvs 23 Sep 2012
(C) 2008 the LGPL VGABios developers Team

If I don't pass an emulated VGA device (and modify seabios to not run the VGA ROM), the guess won't read anything from the rom at all.

Can anyone point me at which parts of the code I might review to see where things are getting mapped and what's going wrong?



On the host system, lspci describes the device:

05:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV620 PRO [Radeon HD 3470] (prog-if 00 [VGA controller])
	Subsystem: Dell Device 3243
	Flags: fast devsel, IRQ 26
	Memory at c0000000 (64-bit, prefetchable) [size=256M]
	Memory at fd9f0000 (64-bit, non-prefetchable) [size=64K]
	I/O ports at ae00 [size=256]
	Expansion ROM at fd900000 [disabled] [size=128K]
	Capabilities: [50] Power Management version 3
	Capabilities: [58] Express Legacy Endpoint, MSI 00
	Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [100] Vendor Specific Information <?>
	Kernel driver in use: pci-stub
	Kernel modules: radeon

and in the guest (Fedora 17):

00:05.0 VGA compatible controller: ATI Technologies Inc Mobility Radeon HD 3470 (prog-if 00 [VGA controller])
	Subsystem: Dell Device 3243
	Physical Slot: 5
	Flags: fast devsel, IRQ 11
	Memory at e0000000 (32-bit, non-prefetchable) [size=256M]
	Memory at f2030000 (32-bit, non-prefetchable) [size=64K]
	I/O ports at c100 [size=256]
	Expansion ROM at f2040000 [disabled] [size=64K]
	Capabilities: [58] Express Legacy Endpoint, MSI 00
	Capabilities: [50] Power Management version 3
	Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit-

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux