]> xenbits.xensource.com Git - qemu-xen-4.4-testing.git/commit
qemu: Don't access /proc/bus/pci unless graphics pass-thru is enabled
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Mon, 13 Feb 2012 17:00:13 +0000 (17:00 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 13 Feb 2012 17:00:13 +0000 (17:00 +0000)
commit414b878e8ea17c65cd0d7f9dfc38dba472857f74
treef2ec64c7d7b4f30156688f0540b25614c16402a4
parent8cc8a3651c9c5bc2d0086d12f4b870fc525b9387
qemu: Don't access /proc/bus/pci unless graphics pass-thru is enabled

A recent changeset introduced a bug whereby an initialization function
that reads /proc/bus/pci is called from graphics set-up functions even
if pass-through graphics are not enabled.  If qemu is run without
permission to this file, this causes qemu to fail during
initialization.

This patch re-works the functions so that the initialization happens
only if we actually need to do the pci host read or write.  It also
makes failures call abort().

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/pass-through.h
hw/pt-graphics.c