]> xenbits.xen.org Git - xenclient/ioemu.git/commit
Fix passthrough regression
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 23 Mar 2009 17:00:50 +0000 (17:00 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 23 Mar 2009 17:00:50 +0000 (17:00 +0000)
commitb6b661fde6697db5678b5bc1f8496c6573f098d0
tree236e790f8345a776040a1ad86c5cc0f4a2e4ad43
parent54b8167b679ce1b0a35289b9e26d14de1d09853c
Fix passthrough regression

pt_init() iterates through the PHP slots independantly of
the assignment that occurs inside __insert_to_pci_slot
which is called by register_real_device(). It assumes
that vslots are assigned in order sarting at PHP_SLOT_START.

This was valid before my change, although why it didn't take the
simpler option of just checking what value had been assigned to
pt_dev->dev.devfn in register_real_device() is a mystery to
me [Simon].  Its also a mystery to what valid circumstance could lead
to pt_init() using 0 (a.k.a. unknown?) as the vslot.

My patch made one the assumptions that pt_init() made about slot numbers
invalid. That is, they don't start at PHP_SLOT_START, they start
wherever there is a free device.

A simple solution seems to be to use the value assigned to
pt_dev->dev.devfn in register_real_device().

Signed-off-by: Simon Horman <horms@verge.net.au>
hw/pass-through.c