« Previous | Next » 

Revision 92615a5a

ID92615a5ab96cd2b4981e2aaef40bece6cd7553b6

Added by David Gibson about 12 years ago

pseries: Fix RTAS based config access

On the pseries platform, access to PCI config space is via RTAS calls(
which go to the hypervisor) rather than MMIO. This means we don't use
the same code path as nearly everyone else which goes through pci_host.c
and we're missing some of the parameter checking along the way.

We do have some parameter checking in the RTAS calls, but it's not enough.
It checks for overruns, but does not check for unaligned accesses,
oversized accesses (which means the guest could trigger an assertion
failure from pci_host_config_{read,write}_common(). Worse it doesn't do
the basic checking for the number of RTAS arguments and results before
accessing them.

This patch fixes these bugs.

Cc: Michael S. Tsirkin <>

Signed-off-by: David Gibson <>
[AF: Fix typos spotted by mst]
Signed-off-by: Andreas Färber <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences